From b31f28c1388345d50633b50572a23b4c35a352ba Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:36:20 +0000 Subject: [PATCH 1/8] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20in?= =?UTF-8?q?itial=20version?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Created using spr 1.3.7 --- .../test-unprivileged-download-artifact.yml | 47 +++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .github/workflows/test-unprivileged-download-artifact.yml diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml new file mode 100644 index 0000000000000..cb37cfebf1dc9 --- /dev/null +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -0,0 +1,47 @@ +name: Test Unprivileged Download Artifact Action + +permissions: + contents: read + +on: + push: + branches: + - main + paths: + - .github/workflows/test-unprivileged-download-artifact.yml + - '.github/workflows/unprivileged-download-artifact/**' + pull_request: + paths: + - .github/workflows/test-unprivileged-download-artifact.yml + - '.github/workflows/unprivileged-download-artifact/**' + +jobs: + test-unprivileged-download-artifact: + name: Test Unprivileged Download Artifact + if: github.repository_owner == 'llvm' + runs-on: ubuntu-24.04 + steps: + - name: Checkout LLVM + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + sparse-checkout: | + .github/workflows/ + - name: Create Test File + run: | + echo "test" > comment + - name: Upload Test File + uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 + with: + name: workflow-args + path: | + comments + - name: Download Artifact + uses: ./.github/workflows/unprivileged-download-artifact + id: download-artifact + with: + run-id: ${{ github.run_id }} + artifact-name: workflow-args + - name: Assert That Contents are the Same + run: | + cat test + cat workflow-args From cb2937c9d99c68beec7975c6a4d27af719d613ea Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:37:15 +0000 Subject: [PATCH 2/8] fix Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index cb37cfebf1dc9..e4d830a4bb7e0 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -43,5 +43,5 @@ jobs: artifact-name: workflow-args - name: Assert That Contents are the Same run: | - cat test + cat comment cat workflow-args From 89641dfdde37d5855a5c834b83d799b502dc185a Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:40:01 +0000 Subject: [PATCH 3/8] fix Created using spr 1.3.7 --- .../test-unprivileged-download-artifact.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index e4d830a4bb7e0..e2b5fc8c4ee3c 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -16,16 +16,11 @@ on: - '.github/workflows/unprivileged-download-artifact/**' jobs: - test-unprivileged-download-artifact: + upload-test-artifact: name: Test Unprivileged Download Artifact if: github.repository_owner == 'llvm' runs-on: ubuntu-24.04 steps: - - name: Checkout LLVM - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 - with: - sparse-checkout: | - .github/workflows/ - name: Create Test File run: | echo "test" > comment @@ -35,6 +30,13 @@ jobs: name: workflow-args path: | comments + + test-download: + name: Test Unprivileged Download Artifact + if: github.repository_owner == 'llvm' + runs-on: ubuntu-24.04 + needs: upload-test-artifacts + steps: - name: Download Artifact uses: ./.github/workflows/unprivileged-download-artifact id: download-artifact @@ -44,4 +46,4 @@ jobs: - name: Assert That Contents are the Same run: | cat comment - cat workflow-args + cat workflow-args \ No newline at end of file From 76ebf810584bf2dc9be83523c4a2d06de611041e Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:54:20 +0000 Subject: [PATCH 4/8] maybe Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index e2b5fc8c4ee3c..3cc671e908018 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -35,7 +35,7 @@ jobs: name: Test Unprivileged Download Artifact if: github.repository_owner == 'llvm' runs-on: ubuntu-24.04 - needs: upload-test-artifacts + needs: [ upload-test-artifacts ] steps: - name: Download Artifact uses: ./.github/workflows/unprivileged-download-artifact @@ -46,4 +46,4 @@ jobs: - name: Assert That Contents are the Same run: | cat comment - cat workflow-args \ No newline at end of file + cat workflow-args From 48ba00330a9c58b4620e5d1a35b3c17e89936cb9 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:55:27 +0000 Subject: [PATCH 5/8] fix Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index 3cc671e908018..1a198c9723ad2 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -35,7 +35,7 @@ jobs: name: Test Unprivileged Download Artifact if: github.repository_owner == 'llvm' runs-on: ubuntu-24.04 - needs: [ upload-test-artifacts ] + needs: [ upload-test-artifact ] steps: - name: Download Artifact uses: ./.github/workflows/unprivileged-download-artifact From cb27cabfe287ee341a4e005607585e874a0fca63 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 01:56:52 +0000 Subject: [PATCH 6/8] fix Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index 1a198c9723ad2..2a80436faef26 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -17,7 +17,7 @@ on: jobs: upload-test-artifact: - name: Test Unprivileged Download Artifact + name: Upload Test Artifact if: github.repository_owner == 'llvm' runs-on: ubuntu-24.04 steps: @@ -37,6 +37,11 @@ jobs: runs-on: ubuntu-24.04 needs: [ upload-test-artifact ] steps: + - name: Chekcout LLVM + uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 + with: + sparse-checkout: | + .github/workflows/unprivileged-download-artifact/action.yml - name: Download Artifact uses: ./.github/workflows/unprivileged-download-artifact id: download-artifact From 81419c9018b101b7cf05f6450743407282e153e2 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 02:06:56 +0000 Subject: [PATCH 7/8] fix Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index 2a80436faef26..c4225c4bf39f7 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -29,7 +29,7 @@ jobs: with: name: workflow-args path: | - comments + comment test-download: name: Test Unprivileged Download Artifact From 0e8aa6ee4273df1aedaa525696070e95163ca849 Mon Sep 17 00:00:00 2001 From: Aiden Grossman Date: Tue, 11 Nov 2025 02:11:15 +0000 Subject: [PATCH 8/8] fix Created using spr 1.3.7 --- .github/workflows/test-unprivileged-download-artifact.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-unprivileged-download-artifact.yml b/.github/workflows/test-unprivileged-download-artifact.yml index c4225c4bf39f7..a9c0912b0f44e 100644 --- a/.github/workflows/test-unprivileged-download-artifact.yml +++ b/.github/workflows/test-unprivileged-download-artifact.yml @@ -51,4 +51,4 @@ jobs: - name: Assert That Contents are the Same run: | cat comment - cat workflow-args + [[ "$(cat comment)" == "test" ]]