Skip to content

Commit cbea376

Browse files
committed
fix: generate matrix refs
1 parent 486d508 commit cbea376

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/workflows/pi_build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
1818
secrets: inherit
1919
with:
20+
checkout_ref: ${{ github.event.pull_request.head.ref }}
2021
repository: "${{ github.repository_owner }}/refinery-submodule-parent-images"
2122

2223
pi-build:

.github/workflows/pi_matrix.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ on:
88
required: false
99
type: string
1010
default: ${{ github.repository }}
11+
checkout_ref:
12+
description: 'Repository ref for actions/checkout'
13+
required: false
14+
type: string
15+
default: ${{ github.event.repository.default_branch }}
1116
parent_image_type:
1217
description: 'If specified, "include" only outputs apps associated to this parent image type'
1318
required: false
@@ -21,6 +26,9 @@ on:
2126
description: 'List[Dict] of apps associated to parent image types'
2227
value: ${{ jobs.pi-matrix.outputs.include }}
2328

29+
env:
30+
GH_TOKEN: ${{ secrets.GH_TOKEN }}
31+
2432
jobs:
2533
pi-matrix:
2634
name: 'Parent Images: Generate Matrix'
@@ -36,7 +44,7 @@ jobs:
3644
uses: actions/checkout@v4
3745
with:
3846
repository: ${{ inputs.repository }}
39-
ref: ${{ github.event.pull_request.head.ref || github.event.repository.default_branch }}
47+
ref: ${{ inputs.checkout_ref }}
4048

4149
- name: Clone cicd-deployment-scripts
4250
run: git clone https://oauth2:${{ secrets.GH_TOKEN }}@github.com/code-kern-ai/cicd-deployment-scripts.git

.github/workflows/pi_merge.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ jobs:
1717
uses: code-kern-ai/cicd-deployment-scripts/.github/workflows/pi_matrix.yml@dev
1818
secrets: inherit
1919
with:
20+
checkout_ref: ${{ github.event.pull_request.base.ref }}
2021
repository: "${{ github.repository_owner }}/refinery-submodule-parent-images"
2122

2223
pi-update-submodule:

0 commit comments

Comments
 (0)