mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-27 00:48:28 +02:00
Add if-not-found
parameter
This commit is contained in:
parent
0706fbf5b9
commit
61eb988d37
6 changed files with 222 additions and 23 deletions
93
.github/workflows/test.yml
vendored
93
.github/workflows/test.yml
vendored
|
@ -106,3 +106,96 @@ jobs:
|
|||
Write-Error "File contents of downloaded artifacts are incorrect"
|
||||
}
|
||||
shell: pwsh
|
||||
|
||||
if-not-found-with-name:
|
||||
name: Test `if-not-found` param wih name specified
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Verify not existing artifact with default value
|
||||
id: default
|
||||
continue-on-error: true
|
||||
uses: ./
|
||||
with:
|
||||
name: not-existing-name
|
||||
|
||||
- name: Check default
|
||||
run: ${{ steps.default.outcome == 'failure' }}
|
||||
|
||||
- name: Verify not existing artifact `error`
|
||||
id: error
|
||||
continue-on-error: true
|
||||
uses: ./
|
||||
with:
|
||||
name: not-existing-name
|
||||
if-not-found: error
|
||||
|
||||
- name: Check `error`
|
||||
run: ${{ steps.error.outcome == 'failure' }}
|
||||
|
||||
- name: Verify not existing artifact `warning`
|
||||
id: warning
|
||||
uses: ./
|
||||
with:
|
||||
name: not-existing-name
|
||||
if-not-found: warn
|
||||
|
||||
- name: Check `warning`
|
||||
run: ${{ steps.warning.outcome == 'success' }}
|
||||
|
||||
- name: Verify not existing artifact `ignore`
|
||||
id: ignore
|
||||
uses: ./
|
||||
with:
|
||||
name: not-existing-name
|
||||
if-not-found: ignore
|
||||
|
||||
- name: Check `ignore`
|
||||
run: ${{ steps.ignore.outcome == 'success' }}
|
||||
|
||||
if-not-found-without-name:
|
||||
name: Test `if-not-found` param wih name specified
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Verify not existing artifact with default value
|
||||
id: default
|
||||
continue-on-error: true
|
||||
uses: ./
|
||||
|
||||
- name: Check default
|
||||
run: ${{ steps.default.outcome == 'failure' }}
|
||||
|
||||
- name: Verify not existing artifact `error`
|
||||
id: error
|
||||
continue-on-error: true
|
||||
uses: ./
|
||||
with:
|
||||
if-not-found: error
|
||||
|
||||
- name: Check `error`
|
||||
run: ${{ steps.error.outcome == 'failure' }}
|
||||
|
||||
- name: Verify not existing artifact `warning`
|
||||
id: warning
|
||||
uses: ./
|
||||
with:
|
||||
if-not-found: warn
|
||||
|
||||
- name: Check `warning`
|
||||
run: ${{ steps.warning.outcome == 'success' }}
|
||||
|
||||
- name: Verify not existing artifact `ignore`
|
||||
id: ignore
|
||||
uses: ./
|
||||
with:
|
||||
if-not-found: ignore
|
||||
|
||||
- name: Check `ignore`
|
||||
run: ${{ steps.ignore.outcome == 'success' }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue