diff --git a/.github/workflows/build-push-docker-image.yml b/.github/workflows/build-push-docker-image.yml index 7ddae0a3ae..9e2739dacd 100644 --- a/.github/workflows/build-push-docker-image.yml +++ b/.github/workflows/build-push-docker-image.yml @@ -38,6 +38,7 @@ jobs: - name: Checkout uses: actions/checkout@v4.1.1 with: + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 1 - name: Setup Docker Buildx @@ -77,7 +78,7 @@ jobs: linux/arm64 build-args: | version=${{ inputs.img_tag }}-arm64 - GIT_COMMIT_SHA=${{ github.sha }} + GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }} # cache-from: type=gha # cache-to: type=gha,mode=max @@ -88,6 +89,7 @@ jobs: - name: Checkout uses: actions/checkout@v4.1.1 with: + ref: ${{ github.event.pull_request.head.sha }} fetch-depth: 1 - name: Setup Docker Buildx @@ -127,7 +129,7 @@ jobs: linux/amd64 build-args: | version=${{ inputs.img_tag }}-amd64 - GIT_COMMIT_SHA=${{ github.sha }} + GIT_COMMIT_SHA=${{ github.event.pull_request.head.sha }} # cache-from: type=gha # cache-to: type=gha,mode=max