Skip to content

Commit

Permalink
Artifact names
Browse files Browse the repository at this point in the history
  • Loading branch information
mmosca committed Dec 25, 2023
1 parent 73a9992 commit 2aa9fd7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,14 +125,14 @@ jobs:
run: |
# This is the hash of the commit for the PR
# when the action is triggered by PR, empty otherwise
COMMIT_ID=${{ github.event.pull_request.head.sha }}
set 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/<n>/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
COMMIT_ID=${COMMIT_ID:-${{ github.sha }}}
BUILD_SUFFIX=ci-$(date '+%Y%m%d')-$(git rev-parse --short ${COMMIT_ID})
VERSION=$(grep version package.json | cut -d: -f2 | sed 's/[",]//g' | awk '{print $1}')
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 | cut -d: -f2 | sed 's/[",]//g' | awk '{print $1}')
echo "BUILD_SUFFIX=${BUILD_SUFFIX}" >> $GITHUB_ENV
echo "BUILD_NAME=inav-configurator-${VERSION}-${BUILD_SUFFIX}" >> $GITHUB_ENV
Expand Down

0 comments on commit 2aa9fd7

Please sign in to comment.