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
This commit is contained in:
parent
6e172b6ce3
commit
1821a992ab
2 changed files with 14 additions and 4 deletions
|
@ -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 }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue