Skip to content

Commit

Permalink
Update action files, add option steps_context, update file Readme
Browse files Browse the repository at this point in the history
…, add option descriptions
  • Loading branch information
dmvict committed Apr 15, 2024
1 parent dfc978b commit 050710d
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ It is a cause of failed jobs. For this case, the action `wretry.action` can retr
- The repository includes subdirectories with alternative action setups that can skip the `pre` or/and `post` stages, as necessary.
- Action handles conditions in `JavaScript` and `Docker` actions ( fields `pre-if` and `post-if` ). Some conditions can be unsolvable and then action skips the stage.
- Resolves external action default inputs from next contexts : `github`, `env`, `job`, `matrix`, `inputs`.
- Can resolve user-provided context `steps`.
- Retries actions with defined number of attempts ( default is 2 ).
- Retries actions with defined delay between attempts ( default is 0 ).

Expand Down Expand Up @@ -81,6 +82,10 @@ An example of declaration of option with multiline string :

Setup working directory for the action. Works with only commands. Default is `github.workspace` path.

### `steps_context`

Pass context `steps` into an external action. The action cannot resolve runtime context `steps` from environment contexts. If you need valid context `steps`, then add option `steps_context : ${{ toJSON( steps ) }}`.

### `attempt_limit`

Set number of attempts. Default is 2.
Expand Down
5 changes: 5 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
Setup working directory for the action. Works with only commands. Default
is `github.workspace` path.
required: false
steps_context:
description: 'Pass context `steps` into an external action. If you need valid context `steps`, then add option as described in `Readme.md`.'
required: false
default: '{}'
attempt_limit:
description: Number of attempts
required: false
Expand Down Expand Up @@ -59,6 +63,7 @@ runs:
command: '${{ inputs.command }}'
with: '${{ inputs.with }}'
current_path: '${{ inputs.current_path }}'
steps_context: '${{ inputs.steps_context }}'
attempt_limit: '${{ inputs.attempt_limit }}'
attempt_delay: '${{ inputs.attempt_delay }}'
retry_condition: '${{ inputs.retry_condition }}'
Expand Down
5 changes: 5 additions & 0 deletions main/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
Setup working directory for the action. Works with only commands. Default
is `github.workspace` path.
required: false
steps_context:
description: 'Pass context `steps` into an external action. If you need valid context `steps`, then add option as described in `Readme.md`.'
required: false
default: '{}'
attempt_limit:
description: Number of attempts
required: false
Expand Down Expand Up @@ -59,6 +63,7 @@ runs:
command: '${{ inputs.command }}'
with: '${{ inputs.with }}'
current_path: '${{ inputs.current_path }}'
steps_context: '${{ inputs.steps_context }}'
attempt_limit: '${{ inputs.attempt_limit }}'
attempt_delay: '${{ inputs.attempt_delay }}'
retry_condition: '${{ inputs.retry_condition }}'
Expand Down
5 changes: 5 additions & 0 deletions post/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
Setup working directory for the action. Works with only commands. Default
is `github.workspace` path.
required: false
steps_context:
description: 'Pass context `steps` into an external action. If you need valid context `steps`, then add option as described in `Readme.md`.'
required: false
default: '{}'
attempt_limit:
description: Number of attempts
required: false
Expand Down Expand Up @@ -59,6 +63,7 @@ runs:
command: '${{ inputs.command }}'
with: '${{ inputs.with }}'
current_path: '${{ inputs.current_path }}'
steps_context: '${{ inputs.steps_context }}'
attempt_limit: '${{ inputs.attempt_limit }}'
attempt_delay: '${{ inputs.attempt_delay }}'
retry_condition: '${{ inputs.retry_condition }}'
Expand Down
5 changes: 5 additions & 0 deletions pre/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ inputs:
Setup working directory for the action. Works with only commands. Default
is `github.workspace` path.
required: false
steps_context:
description: 'Pass context `steps` into an external action. If you need valid context `steps`, then add option as described in `Readme.md`.'
required: false
default: '{}'
attempt_limit:
description: Number of attempts
required: false
Expand Down Expand Up @@ -59,6 +63,7 @@ runs:
command: '${{ inputs.command }}'
with: '${{ inputs.with }}'
current_path: '${{ inputs.current_path }}'
steps_context: '${{ inputs.steps_context }}'
attempt_limit: '${{ inputs.attempt_limit }}'
attempt_delay: '${{ inputs.attempt_delay }}'
retry_condition: '${{ inputs.retry_condition }}'
Expand Down

0 comments on commit 050710d

Please sign in to comment.