Fix build workflow checking out correct branch
Some checks are pending
build / Check package changes (push) Waiting to run
build / Build packages (push) Blocked by required conditions
build / Deploy repository (push) Blocked by required conditions

On running from workflow_run should check out the ref that workflow_run
was running on.
This commit is contained in:
Marty Oehme 2025-06-24 20:44:39 +02:00
parent 962a2de013
commit db5c74ebfb
Signed by: Marty
GPG key ID: 4E535BC19C61886E

View file

@ -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 }}