Skip to content

Commit 67fa507

Browse files
authored
🐛 Use ci_ref vs workflow_ref in package_and_upload_all (#101)
1 parent 89d05c5 commit 67fa507

1 file changed

Lines changed: 6 additions & 15 deletions

File tree

.github/workflows/package_and_upload_all.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ on:
4040
modules_support_needed:
4141
type: boolean
4242
default: False
43+
ci_ref:
44+
type: string
45+
default: "5.x.y"
46+
description: "Git ref (branch, tag, or SHA) of libhal/ci to use for scripts"
4347

4448
secrets:
4549
conan_remote_password:
@@ -48,17 +52,6 @@ on:
4852
required: false
4953

5054
jobs:
51-
extract-ci-ref:
52-
runs-on: ubuntu-latest
53-
outputs:
54-
ci_ref: ${{ steps.extract.outputs.ci_ref }}
55-
steps:
56-
- id: extract
57-
run: |
58-
CI_REF="${{ github.workflow_ref }}"
59-
CI_REF="${CI_REF#*@}"
60-
echo "ci_ref=$CI_REF" >> "$GITHUB_OUTPUT"
61-
6255
linux_x86_64_llvm:
6356
uses: ./.github/workflows/package_and_upload.yml
6457
with:
@@ -120,7 +113,6 @@ jobs:
120113

121114
cortex-m_llvm:
122115
runs-on: ubuntu-latest
123-
needs: extract-ci-ref
124116
env:
125117
VERBOSE: 1
126118
CONAN_REMOTE_USER: ${{ secrets.conan_remote_user }}
@@ -147,7 +139,7 @@ jobs:
147139
uses: actions/checkout@v4.1.1
148140
with:
149141
repository: libhal/ci
150-
ref: ${{ needs.extract-ci-ref.outputs.ci_ref }}
142+
ref: ${{ inputs.ci_ref }}
151143
path: ci-repo
152144

153145
- name: 📦 Build packages for all Cortex-M architectures
@@ -176,7 +168,6 @@ jobs:
176168

177169
cortex-m_gcc:
178170
runs-on: ubuntu-latest
179-
needs: extract-ci-ref
180171
if: ${{ inputs.modules_support_needed == false }}
181172
env:
182173
VERBOSE: 1
@@ -204,7 +195,7 @@ jobs:
204195
uses: actions/checkout@v4.1.1
205196
with:
206197
repository: libhal/ci
207-
ref: ${{ needs.extract-ci-ref.outputs.ci_ref }}
198+
ref: ${{ inputs.ci_ref }}
208199
path: ci-repo
209200

210201
- name: 📦 Build packages for all Cortex-M architectures

0 commit comments

Comments
 (0)