diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 12af11982..e53d50af8 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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