Skip to content

Commit b0860b2

Browse files
authored
workflows/release-binaries: Always pull composite actions from main branch (#100805)
If we pull from the release tag, then if there is a bug in one of the actions on the release tag, then we can never do a build for that tag. Pulling from main will allows us to fix bugs in the actions we use to build the releases.
1 parent fea5914 commit b0860b2

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

.github/workflows/release-binaries.yml

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,20 @@ jobs:
148148
if: github.repository == 'llvm/llvm-project'
149149
runs-on: ${{ inputs.runs-on }}
150150
steps:
151+
152+
- name: Checkout Actions
153+
uses: actions/checkout@@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
154+
with:
155+
ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }}
156+
sparse-checkout: |
157+
.github/workflows/
158+
sparse-checkout-cone-mode: false
159+
path: workflows
160+
161+
- name: Setup Stage
162+
id: setup-stage
163+
uses: ./workflows/.github/workflows/release-binaries-setup-stage
164+
151165
- name: Checkout LLVM
152166
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
153167
with:
@@ -161,10 +175,6 @@ jobs:
161175
key: sccache-${{ runner.os }}-${{ runner.arch }}-release
162176
variant: sccache
163177

164-
- name: Setup Stage
165-
id: setup-stage
166-
uses: ./.github/workflows/release-binaries-setup-stage
167-
168178
- name: Build Stage 1 Clang
169179
id: build
170180
shell: bash
@@ -184,7 +194,7 @@ jobs:
184194
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
185195
186196
- name: Save Stage
187-
uses: ./.github/workflows/release-binaries-save-stage
197+
uses: ./workflows/.github/workflows/release-binaries-save-stage
188198
with:
189199
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
190200

0 commit comments

Comments
 (0)