From 022ad708d6590aeecfd9245a1a36450feea46afa Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 22:14:44 +0000 Subject: [PATCH 1/4] Initial plan From 659895785e7a73582df33bb9d0169f65dea16cc3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 22:16:36 +0000 Subject: [PATCH 2/4] Add three workflow files to test upload-artifact limits Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com> --- .../upload-artifact-test-single-upload.yml | 28 ++++++++++++ .../upload-artifact-test-split-upload.yml | 43 +++++++++++++++++++ .../workflows/upload-artifact-test-zipped.yml | 33 ++++++++++++++ 3 files changed, 104 insertions(+) create mode 100644 .github/workflows/upload-artifact-test-single-upload.yml create mode 100644 .github/workflows/upload-artifact-test-split-upload.yml create mode 100644 .github/workflows/upload-artifact-test-zipped.yml diff --git a/.github/workflows/upload-artifact-test-single-upload.yml b/.github/workflows/upload-artifact-test-single-upload.yml new file mode 100644 index 0000000..acadba0 --- /dev/null +++ b/.github/workflows/upload-artifact-test-single-upload.yml @@ -0,0 +1,28 @@ +# Workflow to test upload-artifact action with 501 files in a single upload +# This tests the 500 file limit mentioned in https://github.com/actions/upload-artifact + +name: Upload Artifact Test - Single Upload + +# Controls when the action will run. Workflow runs when manually triggered using the UI or API. +on: + workflow_dispatch: + +jobs: + test-single-upload: + name: Test uploading 501 files in a single upload-artifact step + runs-on: ubuntu-latest + + steps: + - name: Create 501 test files + run: | + mkdir -p test-files + for i in {1..501}; do + echo "This is test file number $i" > test-files/file-$i.txt + done + echo "Created $(ls test-files | wc -l) files" + + - name: Upload all 501 files in a single step + uses: actions/upload-artifact@v4 + with: + name: test-501-files-single-upload + path: test-files/ diff --git a/.github/workflows/upload-artifact-test-split-upload.yml b/.github/workflows/upload-artifact-test-split-upload.yml new file mode 100644 index 0000000..022af55 --- /dev/null +++ b/.github/workflows/upload-artifact-test-split-upload.yml @@ -0,0 +1,43 @@ +# Workflow to test upload-artifact action with 501 files split into 2 uploads +# This tests the 500 file limit mentioned in https://github.com/actions/upload-artifact + +name: Upload Artifact Test - Split Upload + +# Controls when the action will run. Workflow runs when manually triggered using the UI or API. +on: + workflow_dispatch: + +jobs: + test-split-upload: + name: Test uploading 501 files in two separate upload-artifact steps + runs-on: ubuntu-latest + + steps: + - name: Create 501 test files + run: | + mkdir -p test-files + for i in {1..501}; do + echo "This is test file number $i" > test-files/file-$i.txt + done + echo "Created $(ls test-files | wc -l) files" + + - name: Upload files 1-250 + uses: actions/upload-artifact@v4 + with: + name: test-501-files-split-upload-part1 + path: | + test-files/file-[1-9].txt + test-files/file-[1-9][0-9].txt + test-files/file-1[0-9][0-9].txt + test-files/file-2[0-4][0-9].txt + test-files/file-250.txt + + - name: Upload files 251-501 + uses: actions/upload-artifact@v4 + with: + name: test-501-files-split-upload-part2 + path: | + test-files/file-25[1-9].txt + test-files/file-2[6-9][0-9].txt + test-files/file-[3-4][0-9][0-9].txt + test-files/file-50[0-1].txt diff --git a/.github/workflows/upload-artifact-test-zipped.yml b/.github/workflows/upload-artifact-test-zipped.yml new file mode 100644 index 0000000..ba6b283 --- /dev/null +++ b/.github/workflows/upload-artifact-test-zipped.yml @@ -0,0 +1,33 @@ +# Workflow to test upload-artifact action with 501 files zipped into a single file +# This tests the 500 file limit mentioned in https://github.com/actions/upload-artifact + +name: Upload Artifact Test - Zipped Upload + +# Controls when the action will run. Workflow runs when manually triggered using the UI or API. +on: + workflow_dispatch: + +jobs: + test-zipped-upload: + name: Test uploading 501 files as a single zip file + runs-on: ubuntu-latest + + steps: + - name: Create 501 test files + run: | + mkdir -p test-files + for i in {1..501}; do + echo "This is test file number $i" > test-files/file-$i.txt + done + echo "Created $(ls test-files | wc -l) files" + + - name: Zip all files + run: | + zip -r test-files.zip test-files/ + echo "Zip file created: $(ls -lh test-files.zip)" + + - name: Upload zip file + uses: actions/upload-artifact@v4 + with: + name: test-501-files-zipped + path: test-files.zip From 0e5b0d9e0256dfd655d6600dc5141260ce161139 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 22:17:17 +0000 Subject: [PATCH 3/4] Fix file splitting logic in split upload workflow Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com> --- .../upload-artifact-test-split-upload.yml | 25 +++++++++++-------- 1 file changed, 14 insertions(+), 11 deletions(-) diff --git a/.github/workflows/upload-artifact-test-split-upload.yml b/.github/workflows/upload-artifact-test-split-upload.yml index 022af55..907cd55 100644 --- a/.github/workflows/upload-artifact-test-split-upload.yml +++ b/.github/workflows/upload-artifact-test-split-upload.yml @@ -21,23 +21,26 @@ jobs: done echo "Created $(ls test-files | wc -l) files" + - name: Create directories for split upload + run: | + mkdir -p test-files-part1 test-files-part2 + for i in {1..250}; do + cp test-files/file-$i.txt test-files-part1/ + done + for i in {251..501}; do + cp test-files/file-$i.txt test-files-part2/ + done + echo "Part 1 has $(ls test-files-part1 | wc -l) files" + echo "Part 2 has $(ls test-files-part2 | wc -l) files" + - name: Upload files 1-250 uses: actions/upload-artifact@v4 with: name: test-501-files-split-upload-part1 - path: | - test-files/file-[1-9].txt - test-files/file-[1-9][0-9].txt - test-files/file-1[0-9][0-9].txt - test-files/file-2[0-4][0-9].txt - test-files/file-250.txt + path: test-files-part1/ - name: Upload files 251-501 uses: actions/upload-artifact@v4 with: name: test-501-files-split-upload-part2 - path: | - test-files/file-25[1-9].txt - test-files/file-2[6-9][0-9].txt - test-files/file-[3-4][0-9][0-9].txt - test-files/file-50[0-1].txt + path: test-files-part2/ From 5e98c7e51ec410ba60c53ee8442c2419c5f059f6 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Wed, 21 Jan 2026 22:18:39 +0000 Subject: [PATCH 4/4] Add permissions blocks to workflow files for security Co-authored-by: mickeygousset <20031479+mickeygousset@users.noreply.github.com> --- .github/workflows/upload-artifact-test-single-upload.yml | 2 ++ .github/workflows/upload-artifact-test-split-upload.yml | 2 ++ .github/workflows/upload-artifact-test-zipped.yml | 2 ++ 3 files changed, 6 insertions(+) diff --git a/.github/workflows/upload-artifact-test-single-upload.yml b/.github/workflows/upload-artifact-test-single-upload.yml index acadba0..d101a4e 100644 --- a/.github/workflows/upload-artifact-test-single-upload.yml +++ b/.github/workflows/upload-artifact-test-single-upload.yml @@ -11,6 +11,8 @@ jobs: test-single-upload: name: Test uploading 501 files in a single upload-artifact step runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Create 501 test files diff --git a/.github/workflows/upload-artifact-test-split-upload.yml b/.github/workflows/upload-artifact-test-split-upload.yml index 907cd55..0ead30b 100644 --- a/.github/workflows/upload-artifact-test-split-upload.yml +++ b/.github/workflows/upload-artifact-test-split-upload.yml @@ -11,6 +11,8 @@ jobs: test-split-upload: name: Test uploading 501 files in two separate upload-artifact steps runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Create 501 test files diff --git a/.github/workflows/upload-artifact-test-zipped.yml b/.github/workflows/upload-artifact-test-zipped.yml index ba6b283..f6a5978 100644 --- a/.github/workflows/upload-artifact-test-zipped.yml +++ b/.github/workflows/upload-artifact-test-zipped.yml @@ -11,6 +11,8 @@ jobs: test-zipped-upload: name: Test uploading 501 files as a single zip file runs-on: ubuntu-latest + permissions: + contents: read steps: - name: Create 501 test files