From ab486f0cb0ee75128180dbf820eb312a18308bec Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 26 Jul 2024 12:45:08 -0700 Subject: [PATCH 1/2] workflows/release-binaries: Always pull composite actions from main branch 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. --- .github/workflows/release-binaries.yml | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 0a800fd006e9d1..5250a9fd4cae10 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -148,6 +148,20 @@ jobs: if: github.repository == 'llvm/llvm-project' runs-on: ${{ inputs.runs-on }} steps: + + - name: Checkout Actions + uses: actions/checkout@v4 + with: + ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }} + sparse-checkout: | + .github/workflows/ + sparse-checkout-cone-mode: false + path: workflows + + - name: Setup Stage + id: setup-stage + uses: ./workflows/.github/workflows/release-binaries-setup-stage + - name: Checkout LLVM uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: @@ -161,10 +175,6 @@ jobs: key: sccache-${{ runner.os }}-${{ runner.arch }}-release variant: sccache - - name: Setup Stage - id: setup-stage - uses: ./.github/workflows/release-binaries-setup-stage - - name: Build Stage 1 Clang id: build shell: bash @@ -184,7 +194,7 @@ jobs: ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build - name: Save Stage - uses: ./.github/workflows/release-binaries-save-stage + uses: ./workflows/.github/workflows/release-binaries-save-stage with: build-prefix: ${{ steps.setup-stage.outputs.build-prefix }} From 40406722e8f3d3831b7b7311e3aab22bd1238228 Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Fri, 26 Jul 2024 13:13:03 -0700 Subject: [PATCH 2/2] Hashpin checkout action --- .github/workflows/release-binaries.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml index 5250a9fd4cae10..38b2ba7ba12dce 100644 --- a/.github/workflows/release-binaries.yml +++ b/.github/workflows/release-binaries.yml @@ -150,7 +150,7 @@ jobs: steps: - name: Checkout Actions - uses: actions/checkout@v4 + uses: actions/checkout@@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 with: ref: ${{ (github.event_name == 'pull_request' && github.sha) || 'main' }} sparse-checkout: |