Skip to content

Commit

Permalink
Compute short hash from GITHUB_SHA rather than using actual Git opera…
Browse files Browse the repository at this point in the history
…tions
  • Loading branch information
Tristan971 committed Jan 9, 2025
1 parent d67556b commit d6510a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
run: |
set -euo pipefail
BUILD_IMAGE="$(echo "ghcr.io/$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]')"
BUILD_VERSION="git-$(date +'%Y%m%d%H%M')-$(git rev-parse --short HEAD)"
BUILD_VERSION="git-$(date +'%Y%m%d%H%M')-$(echo "$GITHUB_SHA" | head -c 7)"
echo "build_image=$BUILD_IMAGE" | tee -a "$GITHUB_OUTPUT"
echo "build_version=$BUILD_VERSION" | tee -a "$GITHUB_OUTPUT"
Expand Down

0 comments on commit d6510a1

Please sign in to comment.