Skip to content

Commit 52befa7

Browse files
committed
Added determining base_ref on push triggers from github in build-using-buildscripts.yml workflow
github.base_ref is not available for on:push triggers, only on:pull_request so we must find the base_ref ourselves. Ticket: ENT-13038 Changelog: none
1 parent 7d9b083 commit 52befa7

1 file changed

Lines changed: 12 additions & 6 deletions

File tree

.github/workflows/build-using-buildscripts.yml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,18 @@ jobs:
3131
with:
3232
myToken: ${{ secrets.GITHUB_TOKEN }}
3333

34+
- name: Checkout Buildscripts
35+
uses: actions/checkout@v3
36+
with:
37+
repository: cfengine/buildscripts
38+
path: buildscripts
39+
fetch-depth: 20
40+
41+
- name: Get base ref
42+
# we use on:push in ../ci.yml when calling this workflow and that event does not include github.base_ref so we must calculate it here in case
43+
run: |
44+
git rev-parse --abbrev-ref @{upstream}
45+
3446
- name: Checkout Core
3547
uses: actions/checkout@v3
3648
with:
@@ -46,12 +58,6 @@ jobs:
4658
path: masterfiles
4759
ref: ${{steps.together.outputs.masterfiles || github.base_ref}}
4860

49-
- name: Checkout Buildscripts (current project)
50-
uses: actions/checkout@v3
51-
with:
52-
path: buildscripts
53-
fetch-depth: 20
54-
5561
- name: Checkout Nova
5662
uses: actions/checkout@v3
5763
with:

0 commit comments

Comments
 (0)