Skip to content

Commit

Permalink
workflows/release-binaries: Fetch composite actions outside of defaul…
Browse files Browse the repository at this point in the history
…t workspace (llvm#100845)

Otherwise, the checkout step will override them.
  • Loading branch information
tstellar authored Jul 31, 2024
1 parent 891d898 commit 41003ff
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions .github/workflows/release-binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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 }}

Expand Down

0 comments on commit 41003ff

Please sign in to comment.