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