From d6510a131112c6f12c9fb1d6061f89edd15c2bc8 Mon Sep 17 00:00:00 2001 From: Tristan Date: Thu, 9 Jan 2025 23:14:47 +0000 Subject: [PATCH] Compute short hash from GITHUB_SHA rather than using actual Git operations --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8a4cded..b49b354 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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"