feat: pass env into builder

This commit is contained in:
Eli Bosley
2024-10-24 11:21:32 -04:00
parent 05fa344454
commit e90f606f43

View File

@@ -65,12 +65,22 @@ jobs:
- name: Test inside of the docker container
run: |
docker run --rm builder npm run coverage
- name: Get Git Short Sha and API version
id: vars
run: |
echo "GIT_SHA=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "API_VERSION=$(cat package.json | jq -r '.version')" >> $GITHUB_OUTPUT
echo "IS_TAGGED=$(git describe --tags --abbrev=0 --exact-match || echo '') >> $GITHUB_OUTPUT
echo "::set-output name=API_VERSION::${API_VERSION}"
- name: Build inside of the docker container
id: build-pack-binary
run: |
docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release -v ${{ github.workspace}}/.git:/app/.git builder npm run build-and-pack
API_VERSION=$(cat package.json | jq -r '.version')
echo "::set-output name=API_VERSION::${API_VERSION}"
docker run --rm -v ${{ github.workspace }}/api/deploy/release:/app/deploy/release builder npm run build-and-pack
with:
env:
GIT_SHA=${{ steps.vars.outputs.sha_short }}
API_VERSION=${{ steps.vars.outputs.API_VERSION }}
IS_TAGGED=${{ steps.vars.outputs.IS_TAGGED }}
- name: Set Hashes
id: set-hashes