@@ -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
0 commit comments