Skip to content

Commit

Permalink
Use git SHA when no tags is available.
Browse files Browse the repository at this point in the history
  • Loading branch information
KtorZ committed Jul 23, 2024
1 parent 5a6cb21 commit 5a52fa3
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,15 @@ jobs:

- name: Tag build artifacts
id: tag
run:
echo "value=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
shell: bash
run: |
if [ "${GITHUB_REF/refs\/tags\//}" -eq "refs/head/master" ]; then
echo "value=$GIT_SHA" >> $GITHUB_OUTPUT
else
echo "value=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
fi
env:
GIT_SHA: ${{ github.sha }}

- name: ❄️ Install Nix
uses: cachix/install-nix-action@v22
Expand Down

0 comments on commit 5a52fa3

Please sign in to comment.