Skip to content

Commit eb07bba

Browse files
committed
Actually checkout the actions from the expected place
1 parent 87f4267 commit eb07bba

2 files changed

Lines changed: 52 additions & 4 deletions

File tree

.github/workflows/build-image.yml

Lines changed: 39 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,11 +130,23 @@ jobs:
130130
- name: Checkout
131131
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
132132

133+
- name: Determine actions ref
134+
id: actions_ref
135+
shell: bash
136+
run: |
137+
WF_REF='${{ github.workflow_ref }}'
138+
REF="${WF_REF##*@}"
139+
# Fallback to main if empty (should not normally happen)
140+
if [ -z "$REF" ]; then
141+
REF='main'
142+
fi
143+
echo "ref=$REF" >> "$GITHUB_OUTPUT"
144+
133145
- name: Checkout github actions
134146
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
135147
with:
136148
repository: AlmaLinux/atomic-ci
137-
ref: 'main'
149+
ref: ${{ steps.actions_ref.outputs.ref }}
138150
path: github-actions
139151

140152
- uses: ./github-actions/.github/actions/prepare-build
@@ -171,11 +183,23 @@ jobs:
171183
with:
172184
fetch-depth: 0 # Fetch all history for changelog generation
173185

186+
- name: Determine actions ref
187+
id: actions_ref
188+
shell: bash
189+
run: |
190+
WF_REF='${{ github.workflow_ref }}'
191+
REF="${WF_REF##*@}"
192+
# Fallback to main if empty (should not normally happen)
193+
if [ -z "$REF" ]; then
194+
REF='main'
195+
fi
196+
echo "ref=$REF" >> "$GITHUB_OUTPUT"
197+
174198
- name: Checkout github actions
175199
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
176200
with:
177201
repository: AlmaLinux/atomic-ci
178-
ref: 'main'
202+
ref: ${{ steps.actions_ref.outputs.ref }}
179203
path: github-actions
180204

181205
- uses: ./github-actions/.github/actions/build
@@ -234,11 +258,23 @@ jobs:
234258
major-version: ${{ steps.push_manifest.outputs.major-version }}
235259
signing-enabled: ${{ env.SIGNING_ENABLED }}
236260
steps:
261+
- name: Determine actions ref
262+
id: actions_ref
263+
shell: bash
264+
run: |
265+
WF_REF='${{ github.workflow_ref }}'
266+
REF="${WF_REF##*@}"
267+
# Fallback to main if empty (should not normally happen)
268+
if [ -z "$REF" ]; then
269+
REF='main'
270+
fi
271+
echo "ref=$REF" >> "$GITHUB_OUTPUT"
272+
237273
- name: Checkout github actions
238274
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
239275
with:
240276
repository: AlmaLinux/atomic-ci
241-
ref: 'main'
277+
ref: ${{ steps.actions_ref.outputs.ref }}
242278
path: github-actions
243279

244280
- uses: ./github-actions/.github/actions/manifest

.github/workflows/build-iso.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,11 +121,23 @@ jobs:
121121
- name: Checkout
122122
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
123123

124+
- name: Determine actions ref
125+
id: actions_ref
126+
shell: bash
127+
run: |
128+
WF_REF='${{ github.workflow_ref }}'
129+
REF="${WF_REF##*@}"
130+
# Fallback to main if empty (should not normally happen)
131+
if [ -z "$REF" ]; then
132+
REF='main'
133+
fi
134+
echo "ref=$REF" >> "$GITHUB_OUTPUT"
135+
124136
- name: Checkout github actions
125137
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v4
126138
with:
127139
repository: AlmaLinux/atomic-ci
128-
ref: 'main'
140+
ref: ${{ steps.actions_ref.outputs.ref }}
129141
path: github-actions
130142

131143
- name: Build ISO

0 commit comments

Comments
 (0)