Skip to content

Commit

Permalink
Merge pull request #112 from dmvict/add_option
Browse files Browse the repository at this point in the history
READY: Add option `time_out` to composite action (depends on #111)
  • Loading branch information
Wandalen committed Feb 7, 2024
2 parents 47ca1fc + 7ed2267 commit 7bef43b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
9 changes: 7 additions & 2 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,13 @@ It is a cause of failed jobs. For this case, the action `wretry.action` can retr
## Features

- Retries Github `JavaScript` actions. The action can be an action repository that is not published on `Marketplace`.
- Retries shell commands.
- Retries Github `Docker` actions that use `Dockerfile` as an image.
- Retries shell commands. Uses default shells to run commands.
- Can retry single action or single command ( multiline command ), but not both simultaneously.
- Retries `main`, `pre` and `post` stages of external actions.
- Always has `pre` and `post` stages. If external action has `pre` or/and `post` stage, then action run it also.
- Handles no conditions in external actions ( fields `pre-if` and `post-if` ). All stages of external action will be performed.
- Resolves external action default inputs from next contexts : `github`, `env`, `job`, `matrix`.
- Resolves external action default inputs from next contexts : `github`, `env`, `job`, `matrix`, `inputs`.
- Retries actions with defined number of attempts ( default is 2 ).
- Retries actions with defined delay between attempts ( default is 0 ).

Expand Down Expand Up @@ -85,6 +86,10 @@ Set number of attempts. Default is 2.

Set delay between attempts in ms. Default is 0.

### `time_out`

Set time out in ms for entire step including all retries. By default actions sets no time out.

## Outputs

The action exposes single output named `outputs`. It collects all the outputs from the action/command in the pretty print JSON map.
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@ inputs:
description: A delay between attempts in ms
required: false
default: 0
time_out:
description: 'Set time out in ms for entire step including all retries. By default actions sets no time out.'
required: false
default: false
outputs:
outputs:
description: A pretty print JSON map with outputs from the wrapped action.
Expand All @@ -50,3 +54,4 @@ runs:
github_context: '${{ toJSON( github ) }}'
job_context: '${{ toJSON( job ) }}'
matrix_context: '${{ toJSON( matrix ) }}'
time_out: '${{ inputs.time_out }}'

0 comments on commit 7bef43b

Please sign in to comment.