Skip to content

Commit

Permalink
Merge pull request #501 from actions/robherley/overwrite-artifact
Browse files Browse the repository at this point in the history
Ability to overwrite an Artifact
  • Loading branch information
robherley committed Jan 18, 2024
2 parents 1eb3cb2 + 05d4fe6 commit 694cdab
Show file tree
Hide file tree
Showing 145 changed files with 597 additions and 9,989 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Expand Up @@ -140,3 +140,31 @@ jobs:
Write-Error "File contents of downloaded artifacts are incorrect"
}
shell: pwsh

# Replace the contents of Artifact #1
- name: 'Overwrite artifact #1 again'
uses: ./
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: path/to/dir-2/file2.txt
overwrite: true

# Download replaced Artifact #1 and verify the correctness of the content
- name: 'Download artifact #1 again'
uses: actions/download-artifact@v4
with:
name: 'Artifact-A-${{ matrix.runs-on }}'
path: overwrite/some/new/path

- name: 'Verify Artifact #1 again'
run: |
$file = "overwrite/some/new/path/file2.txt"
if(!(Test-Path -path $file))
{
Write-Error "Expected file does not exist"
}
if(!((Get-Content $file) -ceq "Hello world from file #2"))
{
Write-Error "File contents of downloaded artifacts are incorrect"
}
shell: pwsh
6 changes: 3 additions & 3 deletions .licenses/npm/@actions/artifact.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .licenses/npm/@actions/core.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .licenses/npm/@actions/github.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

30 changes: 10 additions & 20 deletions .licenses/npm/@actions/glob.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 0 additions & 32 deletions .licenses/npm/@actions/http-client.dep.yml

This file was deleted.

30 changes: 10 additions & 20 deletions .licenses/npm/@actions/io.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 0 additions & 32 deletions .licenses/npm/@azure/abort-controller.dep.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .licenses/npm/@azure/core-auth.dep.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .licenses/npm/@azure/core-http.dep.yml

This file was deleted.

33 changes: 0 additions & 33 deletions .licenses/npm/@azure/core-lro.dep.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .licenses/npm/@azure/core-paging.dep.yml

This file was deleted.

32 changes: 0 additions & 32 deletions .licenses/npm/@azure/core-tracing.dep.yml

This file was deleted.

0 comments on commit 694cdab

Please sign in to comment.