mirror of
https://github.com/actions/download-artifact.git
synced 2025-07-22 14:38:25 +02:00
Add warn-on-failure
Some users might not want their workflow jobs to die just because an artifact isn't available...
This commit is contained in:
parent
c3c8e4145a
commit
bd6ef4177a
6 changed files with 77 additions and 9 deletions
23
.github/workflows/test.yml
vendored
23
.github/workflows/test.yml
vendored
|
@ -118,6 +118,29 @@ jobs:
|
|||
path: single/directory
|
||||
merge-multiple: true
|
||||
|
||||
- name: Request missing Artifact
|
||||
id: request-missing-artifact
|
||||
uses: ./
|
||||
with:
|
||||
name: nonexistent
|
||||
warn-on-failure: true
|
||||
|
||||
- name: Check missing warning
|
||||
env:
|
||||
output: ${{ steps.request-missing-artifact.outputs.failure }}
|
||||
if: ${{ !contains(env.output, 'Unable to download artifact(s):') }}
|
||||
run: |
|
||||
false
|
||||
shell: bash
|
||||
|
||||
- name: Log missing warning
|
||||
env:
|
||||
output: ${{ steps.request-missing-artifact.outputs.failure }}
|
||||
run_os: ${{ matrix.runs-on }}
|
||||
run: |
|
||||
echo "::notice title=This message is expected::[$run_os] $output"
|
||||
shell: bash
|
||||
|
||||
- name: Verify successful download
|
||||
run: |
|
||||
$fileA = "single/directory/file-A.txt"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue