From 8a9eeda717870b8f8eff4fe278589ad00cbaf4b7 Mon Sep 17 00:00:00 2001 From: Riku Rouvila Date: Tue, 29 Oct 2024 11:10:32 +0200 Subject: [PATCH] separate out pulling for pull requests and pushes --- .github/workflows/build-images-from-branch.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-images-from-branch.yml b/.github/workflows/build-images-from-branch.yml index d42a37fe52..b5d03c5f19 100644 --- a/.github/workflows/build-images-from-branch.yml +++ b/.github/workflows/build-images-from-branch.yml @@ -33,9 +33,13 @@ jobs: ref: '${{ github.event.inputs.branch_name }}' - uses: actions/checkout@v4 - if: github.event_name == 'push' || github.event_name == 'pull_request' + if: github.event_name == 'push' + with: + ref: ${{ github.event.pull_request.head.sha }} + + - uses: actions/checkout@v4 + if: github.event_name == 'pull_request' with: - fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }} - name: Set version and branch