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

Add allow-not-found input argument #301

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

croemheld
Copy link

Closes #42

This PR adds the allow-not-found input argument to download-artifact that, when set to true, will not fail the action when an artifact with the specified name input argument is not found.

If the artifact is not found, the output of download-path of the action will contain an empty string instead of the would-be download path. This can be checked in the subsequent step via ${{ steps.<id>.outputs.download-path != '' }} as can be seen in the updated workflow test.yml file. Additionally, a warning is printed via core.warning if the artifact is not found while allow-not-found is set to true.

If allow-not-found is set to false (default behavior), the action behaves as it did before this PR.

@croemheld croemheld requested a review from a team as a code owner February 24, 2024 08:32
@croemheld
Copy link
Author

@robherley As of now, there still seem to be proponents of this feature. Is there a chance that this is still going to be included or are there other plans currently?

Copy link

@DaUs3103 DaUs3103 left a comment

Choose a reason for hiding this comment

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

Copy link

@DaUs3103 DaUs3103 left a comment

Choose a reason for hiding this comment

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

@DaUs3103
Copy link

README.md

@croemheld
Copy link
Author

@DaUs3103 Thanks for reviewing! I wasn't sure how to interpret your comment, should I update the README.md and CHANGELOG.md files as well?

@rrundle-dave
Copy link

@croemheld I think he's saying update the README because any new option that gets added needs to be documented so users know it's an available option.

@croemheld
Copy link
Author

@DaUs3103 @rrundle-dave Sorry for the long delay, I rebased on top of the latest changes and updated the README.md file with the new input argument as well.

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.

Is it possible to not fail the workflow if the artifact doesn't exist?
3 participants