From 87131a171fa4033c58d043974b4c29d4e1a1d1ef Mon Sep 17 00:00:00 2001 From: Darragh Bailey Date: Thu, 3 Nov 2022 18:20:44 +0000 Subject: [PATCH] Ensure buildah job checks out pull request changes (#1656) With the change to using pull_request_target, need to ensure the buildah job also checks out the PR contents. --- .github/workflows/docker-image.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index efb324d..f1e3b5d 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -27,9 +27,17 @@ jobs: steps: - name: Checkout + if: ${{ ! startsWith(github.event_name, 'pull_request') }} uses: actions/checkout@v3 with: fetch-depth: 0 + - + if: startsWith(github.event_name, 'pull_request') + name: Checkout + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ github.event.pull_request.head.sha }} - name: Build with buildah run: buildah bud .