[llvm] workflows/release-binaries: Fetch composite actions outside of default workspace (PR #100845)
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 21:37:03 PDT 2024
https://github.com/tstellar updated https://github.com/llvm/llvm-project/pull/100845
>From 97cf62d3f456a59aa04e38a1489593f5b527b931 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 26 Jul 2024 17:38:23 -0700
Subject: [PATCH 1/5] workflows/release-binaries: Fetch composite actions
outside of default workspace
Otherwise, the checkout step will override them.
---
.github/workflows/release-binaries.yml | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index f7ed88ff03add..927eee3157739 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -156,11 +156,13 @@ jobs:
sparse-checkout: |
.github/workflows/
sparse-checkout-cone-mode: false
- path: workflows
+ # 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
+ uses: ../workflows/.github/workflows/release-binaries-setup-stage
- name: Checkout LLVM
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -194,7 +196,7 @@ jobs:
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
- name: Save Stage
- uses: ./workflows/.github/workflows/release-binaries-save-stage
+ uses: ../workflows/.github/workflows/release-binaries-save-stage
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
>From 6b8ff81b6a525872082e67686777485abd917550 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 26 Jul 2024 19:46:43 -0700
Subject: [PATCH 2/5] Try to fix uses path
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 927eee3157739..a1f26689b5330 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -162,7 +162,7 @@ jobs:
- name: Setup Stage
id: setup-stage
- uses: ../workflows/.github/workflows/release-binaries-setup-stage
+ uses: ${{ github.workspace }}/../workflows/.github/workflows/release-binaries-setup-stage
- name: Checkout LLVM
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -196,7 +196,7 @@ jobs:
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
- name: Save Stage
- uses: ../workflows/.github/workflows/release-binaries-save-stage
+ uses: ${{ github.workspace }}/../workflows/.github/workflows/release-binaries-save-stage
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
>From 16a291f5f1b1464ff5f6420ca67917f17694ebee Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 26 Jul 2024 20:56:17 -0700
Subject: [PATCH 3/5] Try to fix uses
---
.github/workflows/release-binaries.yml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index a1f26689b5330..7a7d775cba069 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -162,7 +162,7 @@ jobs:
- name: Setup Stage
id: setup-stage
- uses: ${{ github.workspace }}/../workflows/.github/workflows/release-binaries-setup-stage
+ uses: "${{ github.workspace }}/../workflows/.github/workflows/release-binaries-setup-stage"
- name: Checkout LLVM
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -196,7 +196,7 @@ jobs:
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
- name: Save Stage
- uses: ${{ github.workspace }}/../workflows/.github/workflows/release-binaries-save-stage
+ uses: "${{ github.workspace }}/../workflows/.github/workflows/release-binaries-save-stage"
with:
build-prefix: ${{ steps.setup-stage.outputs.build-prefix }}
>From 4ae38f3ccf956c8db5301409f44dd52e51b577df Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 26 Jul 2024 20:59:37 -0700
Subject: [PATCH 4/5] Fix paths again
---
.github/workflows/release-binaries.yml | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index 7a7d775cba069..bae328dbe63a8 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -160,15 +160,20 @@ jobs:
# remove it.
path: ../workflows
- - name: Setup Stage
- id: setup-stage
- uses: "${{ github.workspace }}/../workflows/.github/workflows/release-binaries-setup-stage"
-
- name: Checkout LLVM
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
ref: ${{ needs.prepare.outputs.ref }}
+ - name: Copy main workflows
+ shell: bash
+ run: |
+ mv ../workflows workflows-main
+
+ - name: Setup Stage
+ id: setup-stage
+ uses: ./workflows-main/.github/workflows/release-binaries-setup-stage
+
- name: Setup sccache
uses: hendrikmuhs/ccache-action at ca3acd2731eef11f1572ccb126356c2f9298d35e # v1.2.9
with:
@@ -196,7 +201,7 @@ jobs:
ls -ltr ${{ steps.setup-stage.outputs.build-prefix }}/build
- name: Save Stage
- uses: "${{ github.workspace }}/../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 }}
>From d13be873c0af5e63dff78cae2e98052deb9f8d7d Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar at redhat.com>
Date: Fri, 26 Jul 2024 21:36:44 -0700
Subject: [PATCH 5/5] Copy workflows
---
.github/workflows/release-binaries.yml | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/release-binaries.yml b/.github/workflows/release-binaries.yml
index bae328dbe63a8..9e57384dd30b3 100644
--- a/.github/workflows/release-binaries.yml
+++ b/.github/workflows/release-binaries.yml
@@ -158,7 +158,12 @@ jobs:
sparse-checkout-cone-mode: false
# Check out outside of working directory so the source checkout doesn't
# remove it.
- path: ../workflows
+ path: workflows
+
+ # Move workflows so they don't get overwritten by checkout. The checkout job
+ # requires checking out to github.workspace.
+ - shell: bash
+ run: mv workflows ../workflows-main
- name: Checkout LLVM
uses: actions/checkout at b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
@@ -168,7 +173,7 @@ jobs:
- name: Copy main workflows
shell: bash
run: |
- mv ../workflows workflows-main
+ mv ../workflows-main .
- name: Setup Stage
id: setup-stage
More information about the llvm-commits
mailing list