fix(ci): set hash of PR commit instead of synthetic commit in docker build argument

This commit is contained in:
Quentin McGaw
2026-03-13 15:12:54 +00:00
parent c83d4b0926
commit 460ffb637a
+5 -1
View File
@@ -169,7 +169,11 @@ jobs:
- name: Short commit - name: Short commit
id: shortcommit 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 - name: Build and push final image
uses: docker/build-push-action@v7 uses: docker/build-push-action@v7