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 wait-for-exact-target option #4

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This action will download a release asset, a build artifact, or a file within a container package based on its inputs and what it discovers while following a set of rules useful to AntelopeIO projects.

### Changelog
* **v3**: added `fail-on-missing-target`; added `downloaded-file` output; made `token` optional; reduces API usage substantially
* **v3**: added `fail-on-missing-target` and `wait-for-exact-target-workflow` inputs; added `downloaded-file` output; made `token` optional; reduces API usage substantially
* **v2**: renamed `ref` to `target`; fixes `prereleases` behavior

### Inputs
Expand All @@ -24,6 +24,8 @@ This action will download a release asset, a build artifact, or a file within a

**`fail-on-missing-target`** is an optional boolean (defaulted to _true_) to control whether the action should fail if the `file` is not found in the case of `target` being a release, or if `artifact-name` is not found in the case of `target` being a branch or ref (which includes the situation where the branch or ref does not exist). Other failures, for example, the `file` not being found in the `artifact-name`, are still considered failures even if this is set to false.

**`wait-for-exact-target`** is an optional boolean (defaulted to _false_) that controls behavior when `target` is a branch or commit and _any_ workflow has not completed at the given target. If `false`, the action will then look at the parent commit's workflows and use artifacts from them (and if that commit's workflows haven't completed, its parent, and so on). If `true`, the action will wait indefinitely for all workflows to complete (use with care!).

### Outputs

**`downloaded-file`** is the filename of the downloaded file, or an empty string if an error occurred.
Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
required: true
default: true
description: 'Whether to fail the step if target release file or artifact-name is not found'
wait-for-exact-target:
required: true
default: false
description: 'When target is a branch or sha, whether to wait up for workflow to complete on exact target or try parents'
outputs:
downloaded-file:
description: 'The name of the downloaded file, or empty string if failure'
Expand Down
Loading