Skip to content
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

Merged
merged 6 commits into from Aug 30, 2022

Conversation

jaypea
Copy link
Contributor

@jaypea jaypea commented Aug 19, 2022

this adds an additional input if_no_files_found which follows the semantic of upload-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.

main.js Outdated Show resolved Hide resolved
action.yml Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
@jaypea jaypea requested review from dawidd6 and benkane and removed request for dawidd6 and benkane August 30, 2022 09:09
# Optional, choose how to exit the action if no artifact is found
# can be one of:
# "fail", "warn", "ignore"
# default ignore
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# default ignore
# default: "fail"

😄

if_no_artifact_found:
required: false
description: choose how to exit the action if no artifact is found
default: "fail"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
default: "fail"
default: fail

action.yml Show resolved Hide resolved
Comment on lines +144 to +145
setExitMessage(ifNoArtifactFound, "no matching workflow run found with any artifacts?")
return
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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) {

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

@dawidd6
Copy link
Owner

dawidd6 commented Aug 30, 2022

Imma go ahead and merge this, will do some adjustments later. Thanks!

@dawidd6 dawidd6 merged commit 9960cfb into dawidd6:master Aug 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants