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:
Josh Soref 2024-01-30 14:58:20 -05:00
parent c3c8e4145a
commit bd6ef4177a
6 changed files with 77 additions and 9 deletions

View file

@ -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"