From db5c74ebfb573c319582e8ae2547fe52c3879996 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 24 Jun 2025 20:44:39 +0200 Subject: [PATCH] Fix build workflow checking out correct branch On running from workflow_run should check out the ref that workflow_run was running on. --- .github/workflows/build.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 589a5cc..d2f08ef 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -96,7 +96,15 @@ jobs: ref: master fetch-depth: 1 + - name: checkout local templates from prev workflow + if: "${{ github.event_name == 'workflow_run' }}" + uses: actions/checkout@v4 + with: + ref: ${{ github.event.workflow_run.head_branch }} + path: added-packages + - name: checkout local templates + if: "${{ github.event_name != 'workflow_run' }}" uses: actions/checkout@v4 with: ref: ${{ github.head_ref }}