From f7c0b050d7c642c9687eeb7e94458266fdef8a9d Mon Sep 17 00:00:00 2001 From: Abhimanyu Babbar Date: Tue, 30 Apr 2024 19:46:13 +0530 Subject: [PATCH] chore: fixed the checkout action in build docker image --- .github/workflows/build-push-docker-image.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) 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