-
Notifications
You must be signed in to change notification settings - Fork 541
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
Add warn-on-failure #286
base: main
Are you sure you want to change the base?
Add warn-on-failure #286
Conversation
core.setOutput( | ||
'failure', | ||
`Unable to download artifact(s): ${err.message}` | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about using a warning annotation instead? https://github.com/actions/toolkit/tree/main/packages/core#annotations
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. Because I can't as a consuming action or a consuming workflow retrieve that without extra permissions and fishing through the logs.
If I'm the consuming action/workflow, I can use the output and then produce my own annotation if I decide it's relevant to my use case.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For demonstration purposes, I could include that in the test.yml to show that it works...
Some users might not want their workflow jobs to die just because an artifact isn't available...
8c95d84
to
bd6ef41
Compare
- 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This demonstrates the ability for consuming workflows to take advantage of the output and report it in whichever way they see fit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this ever going to be reviewed? |
Some users might not want their workflow jobs to die just because an artifact isn't available...
fixes #285
closes #42, closes #208, closes #254