Skip to content

Commit 604373d

Browse files
authored
Merge pull request #625 from actions/robherley/artifact-2.1.10
Update @actions/artifact to latest version, includes symlink and timeout fixes
2 parents 3eadd8b + 0150148 commit 604373d

File tree

7 files changed

+3047
-190
lines changed

7 files changed

+3047
-190
lines changed

.github/workflows/test.yml

+30-1
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,18 @@ jobs:
4646
- name: Test
4747
run: npm run test
4848

49-
# Test end-to-end by uploading two artifacts and then downloading them
49+
# Test end-to-end by uploading a few artifacts and then downloading them
5050
- name: Create artifact files
5151
run: |
5252
mkdir -p path/to/dir-1
5353
mkdir -p path/to/dir-2
5454
mkdir -p path/to/dir-3
55+
mkdir -p symlink/
5556
echo "Lorem ipsum dolor sit amet" > path/to/dir-1/file1.txt
5657
echo "Hello world from file #2" > path/to/dir-2/file2.txt
58+
echo "Hello from a symlinked file" > symlink/original.txt
59+
ln -s $(pwd)/symlink/original.txt symlink/file.txt
60+
shell: bash
5761

5862
# Upload a single file artifact
5963
- name: 'Upload artifact #1'
@@ -79,6 +83,12 @@ jobs:
7983
path/to/dir-[23]/*
8084
!path/to/dir-3/*.txt
8185
86+
- name: 'Upload symlinked artifact'
87+
uses: ./
88+
with:
89+
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
90+
path: symlink/file.txt
91+
8292
# Download Artifact #1 and verify the correctness of the content
8393
- name: 'Download artifact #1'
8494
uses: actions/download-artifact@v4
@@ -141,6 +151,25 @@ jobs:
141151
}
142152
shell: pwsh
143153

154+
- name: 'Download symlinked artifact'
155+
uses: actions/download-artifact@v4
156+
with:
157+
name: 'Symlinked-Artifact-${{ matrix.runs-on }}'
158+
path: from/symlink
159+
160+
- name: 'Verify symlinked artifact'
161+
run: |
162+
$file = "from/symlink/file.txt"
163+
if(!(Test-Path -path $file))
164+
{
165+
Write-Error "Expected file does not exist"
166+
}
167+
if(!((Get-Content $file) -ceq "Hello from a symlinked file"))
168+
{
169+
Write-Error "File contents of downloaded artifact are incorrect"
170+
}
171+
shell: pwsh
172+
144173
- name: 'Alter file 1 content'
145174
run: |
146175
echo "This file has changed" > path/to/dir-1/file1.txt

.licenses/npm/@actions/artifact.dep.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.licenses/npm/@actions/core.dep.yml

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)