Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to overwrite an Artifact #501

Merged
merged 5 commits into from
Jan 18, 2024
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
28 changes: 28 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
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.

Loading