diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 9a0a4cc24..965b7ee24 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -127,16 +127,17 @@ jobs: run: | # This is the hash of the commit for the PR # when the action is triggered by PR, empty otherwise - set COMMIT_ID=${{ github.event.pull_request.head.sha }} + COMMIT_ID=${{ github.event.pull_request.head.sha }} # This is the hash of the commit when triggered by push # but the hash of refs/pull//merge, which is different # from the hash of the latest commit in the PR, that's # why we try github.event.pull_request.head.sha first - set COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} - set BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) - set VERSION=$(grep version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g') + COMMIT_ID=${COMMIT_ID:-${{ github.sha }}} + BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID}) + VERSION=$(grep version package.json | sed 's/.*"\([0-9][0-9]*.[0-9]*.[0-9]*\)".*/\1/g') echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV echo "BUILD_NAME=inav-configurator-${VERSION}-${BUILD_SUFFIX}" >> $GITHUB_ENV + shell: bash - uses: actions/setup-node@v4 with: