Skip to content

Commit

Permalink
Merge pull request #4 from cytopia/release-v0.1.3
Browse files Browse the repository at this point in the history
Release v0.1.3
  • Loading branch information
cytopia authored Mar 22, 2022
2 parents cc4194f + c8c2b7c commit d2d6473
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ The following inputs can be used to alter the Docker tag name determination:
| `retries` | No | `10` | How many times to retry on failure. |
| `pause` | No | `10` | How many seconds to wait between retries. |
| `command` | Yes | `` | Shell command to execute |
| `workdir` | No | `` | Switch to this working directory prior executing the shell command |


## :arrow_backward: Outputs
Expand Down Expand Up @@ -70,9 +71,11 @@ updates:
| Name | Description |
|------------------------------|-------------|
| [docker-tag-action] | Determines Docker tags based on git branch, commit or git tag |
| [git-ref-matrix-action] | Create stringified JSON list of git refs to be used as a build matrix |
| [shell-command-retry-action] | Retries shell commands to avoid failing pipelines due to network issues |

[docker-tag-action]: https://github.com/cytopia/docker-tag-action
[git-ref-matrix-action]: https://github.com/cytopia/git-ref-matrix-action
[shell-command-retry-action]: https://github.com/cytopia/shell-command-retry-action


Expand Down
8 changes: 8 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ inputs:
description: 'Shell command to execute'
required: true
default: 'true'
workdir:
description: 'Switch to this working directory prior executing shell command'
required: false
default: ''

runs:
using: "composite"
Expand All @@ -38,8 +42,12 @@ runs:
done;
return 1;
}
if [ -n "${WORKDIR}" ]; then
cd "${WORKDIR}"
fi
retry ${COMMAND}
env:
RETRIES: ${{ inputs.retries }}
PAUSE: ${{ inputs.pause }}
COMMAND: ${{ inputs.command }}
WORKDIR: ${{ inputs.workdir }}

0 comments on commit d2d6473

Please sign in to comment.