@@ -156,17 +156,34 @@ jobs:
156
156
sparse-checkout : |
157
157
.github/workflows/
158
158
sparse-checkout-cone-mode : false
159
+ # Check out outside of working directory so the source checkout doesn't
160
+ # remove it.
159
161
path : workflows
160
162
161
- - name : Setup Stage
162
- id : setup-stage
163
- uses : ./workflows/.github/workflows/release-binaries-setup-stage
163
+ # actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
164
+ # Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
165
+ # by future actions/checkout steps. Therefore, in order to checkout the
166
+ # latest actions from main, we need to first checkout out the actions inside of
167
+ # GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
168
+ # the code being built and the move the actions from main back into GITHUB_WORKSPACE,
169
+ # becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
170
+ - shell : bash
171
+ run : mv workflows ../workflows-main
164
172
165
173
- name : Checkout LLVM
166
174
uses : actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
167
175
with :
168
176
ref : ${{ needs.prepare.outputs.ref }}
169
177
178
+ - name : Copy main workflows
179
+ shell : bash
180
+ run : |
181
+ mv ../workflows-main .
182
+
183
+ - name : Setup Stage
184
+ id : setup-stage
185
+ uses : ./workflows-main/.github/workflows/release-binaries-setup-stage
186
+
170
187
- name : Setup sccache
171
188
uses : hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
172
189
with :
@@ -194,7 +211,7 @@ jobs:
194
211
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
195
212
196
213
- name : Save Stage
197
- uses : ./workflows/.github/workflows/release-binaries-save-stage
214
+ uses : ./workflows-main /.github/workflows/release-binaries-save-stage
198
215
with :
199
216
build-prefix : ${{ steps.setup-stage.outputs.build-prefix }}
200
217
0 commit comments