Fix build workflow checking out correct branch
On running from workflow_run should check out the ref that workflow_run was running on.
This commit is contained in:
parent
962a2de013
commit
db5c74ebfb
1 changed files with 8 additions and 0 deletions
8
.github/workflows/build.yaml
vendored
8
.github/workflows/build.yaml
vendored
|
|
@ -96,7 +96,15 @@ jobs:
|
||||||
ref: master
|
ref: master
|
||||||
fetch-depth: 1
|
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
|
- name: checkout local templates
|
||||||
|
if: "${{ github.event_name != 'workflow_run' }}"
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.head_ref }}
|
ref: ${{ github.head_ref }}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue