Skip to content

Commit

Permalink
add wait-for-exact-target option
Browse files Browse the repository at this point in the history
  • Loading branch information
spoonincode committed Oct 18, 2023
1 parent a5c9e5b commit 9536208
Show file tree
Hide file tree
Showing 5 changed files with 23,112 additions and 930 deletions.
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

0 comments on commit 9536208

Please sign in to comment.