Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/upload-artifact-test-single-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# 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
permissions:
contents: read

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/
48 changes: 48 additions & 0 deletions .github/workflows/upload-artifact-test-split-upload.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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
permissions:
contents: read

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: 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-part1/

- name: Upload files 251-501
uses: actions/upload-artifact@v4
with:
name: test-501-files-split-upload-part2
path: test-files-part2/
35 changes: 35 additions & 0 deletions .github/workflows/upload-artifact-test-zipped.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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
permissions:
contents: read

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