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
feat: add additional input to define how to fail the action #187
Conversation
# Optional, choose how to exit the action if no artifact is found | ||
# can be one of: | ||
# "fail", "warn", "ignore" | ||
# default ignore |
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.
# default ignore | |
# default: "fail" |
😄
if_no_artifact_found: | ||
required: false | ||
description: choose how to exit the action if no artifact is found | ||
default: "fail" |
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.
default: "fail" | |
default: fail |
setExitMessage(ifNoArtifactFound, "no matching workflow run found with any artifacts?") | ||
return |
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.
setExitMessage(ifNoArtifactFound, "no matching workflow run found with any artifacts?") | |
return | |
return exitWithMessage(ifNoArtifactFound, "no matching workflow run found with any artifacts?") |
Could we do it like this?
for (const artifact of artifacts) { | ||
|
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.
Imma go ahead and merge this, will do some adjustments later. Thanks! |
this adds an additional input
if_no_files_found
which follows the semantic ofupload-artifact
.the proposes solution in the issue comments to use
continue-on-error
has the ugly side-effect of showing a red warning in the workflow summary.as I'm trying to train the developers to actually look at this summary in order to watch out for lint warning, they should not see red false-negative results in this list.