From 460ffb637a6d210e306fc67b573f58b26c027e83 Mon Sep 17 00:00:00 2001 From: Quentin McGaw Date: Fri, 13 Mar 2026 15:12:54 +0000 Subject: [PATCH] fix(ci): set hash of PR commit instead of synthetic commit in docker build argument --- .github/workflows/ci.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e3cf22b9..f216b4b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -169,7 +169,11 @@ jobs: - name: Short commit id: shortcommit - run: echo "::set-output name=value::$(git rev-parse --short HEAD)" + run: | + # Use the PR head SHA if it exists, otherwise fallback to GITHUB_SHA + FULL_SHA="${{ github.event.pull_request.head.sha || github.sha }}" + SHORT_SHA= + echo "value=$(echo $FULL_SHA | cut -c1-7)" >> $GITHUB_OUTPUT - name: Build and push final image uses: docker/build-push-action@v7