workflows/release-binaries: Fetch composite actions outside of default workspace (#100845)

Otherwise, the checkout step will override them.
This commit is contained in:
Tom Stellard 2024-07-30 18:54:20 -07:00 committed by GitHub
parent 891d89804b
commit 41003ff3fe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -156,17 +156,34 @@ jobs:
sparse-checkout: |
.github/workflows/
sparse-checkout-cone-mode: false
# Check out outside of working directory so the source checkout doesn't
# remove it.
path: workflows
- name: Setup Stage
id: setup-stage
uses: ./workflows/.github/workflows/release-binaries-setup-stage
# actions/checkout does not support paths outside of the GITHUB_WORKSPACE.
# Also, anything that we put inside of GITHUB_WORKSPACE will be overwritten
# by future actions/checkout steps. Therefore, in order to checkout the
# latest actions from main, we need to first checkout out the actions inside of
# GITHUB_WORKSPACE (see previous step), then use actions/checkout to checkout
# the code being built and the move the actions from main back into GITHUB_WORKSPACE,
# becasue the uses on composite actions only reads workflows from inside GITHUB_WORKSPACE.
- shell: bash
run: mv workflows ../workflows-main
- name: Checkout LLVM
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ needs.prepare.outputs.ref }}
- name: Copy main workflows
shell: bash
run: |
mv ../workflows-main .
- name: Setup Stage
id: setup-stage
uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
- name: Setup sccache
uses: hendrikmuhs/ccache-action@ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
with:
@ -194,7 +211,7 @@ jobs:
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
- name: Save Stage
uses: ./workflows/.github/workflows/release-binaries-save-stage
uses: ./workflows-main/.github/workflows/release-binaries-save-stage
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}