about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHailey <me@haileyok.com>2024-05-09 17:29:25 -0700
committerGitHub <noreply@github.com>2024-05-09 17:29:25 -0700
commit1821a992abd1ff55a5af60f18b8af7e01af8bc77 (patch)
tree80c8d372634afa845bb395a25de4dff790b1f428 /.github/workflows
parent6e172b6ce359e88b0be3648c9ca92841fd90740d (diff)
downloadvoidsky-1821a992abd1ff55a5af60f18b8af7e01af8bc77.tar.zst
Use build arg in docker action to correctly pass git commit SHA (#3940)
* use env variables through docker args

* remove quotes

* use an output instead

* try that again

* write the variables to .env

* rm unused

* use short sha

* remove test branch
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/build-and-push-bskyweb-aws.yaml9
1 files changed, 6 insertions, 3 deletions
diff --git a/.github/workflows/build-and-push-bskyweb-aws.yaml b/.github/workflows/build-and-push-bskyweb-aws.yaml
index c445ca2d5..6eb9485b1 100644
--- a/.github/workflows/build-and-push-bskyweb-aws.yaml
+++ b/.github/workflows/build-and-push-bskyweb-aws.yaml
@@ -43,6 +43,10 @@ jobs:
           tags: |
             type=sha,enable=true,priority=100,prefix=,suffix=,format=long
 
+      - name: Set outputs
+        id: vars
+        run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
+
       - name: Build and push Docker image
         id: build-and-push
         uses: docker/build-push-action@v4
@@ -54,6 +58,5 @@ jobs:
           labels: ${{ steps.meta.outputs.labels }}
           cache-from: type=gha
           cache-to: type=gha,mode=max
-        env:
-          EXPO_PUBLIC_BUNDLE_IDENTIFIER: $(git rev-parse --short HEAD)
-          EXPO_PUBLIC_BUNDLE_DATE: $(date -u +"%y%m%d%H")
+          build-args: |
+            EXPO_PUBLIC_BUNDLE_IDENTIFIER=${{ steps.vars.outputs.sha_short }}