diff --git a/README.md b/README.md index f94487d..27493bf 100644 --- a/README.md +++ b/README.md @@ -160,6 +160,12 @@ All input names in **bold** are _required_. | `acceptable_conclusions` | A comma-separated list of acceptable statuses. If any of these statuses are present, the action will not fail.

See the [GitHub REST API documentation](https://docs.github.com/en/rest/actions/workflow-jobs#get-a-job-for-a-workflow-run), specifically, the Response schema's "conclusion" property's `enum` values, for a complete list of supported values (excluding `null`). | `success` | | `fail_fast` | If set to true, the action will fail as soon as a check fails. If set to false (default), the action will wait for all checks to complete before failing. | `False` | +### Deprecated inputs + +| Name | Replaced by | Deprecated since | +|:---:|:---:|:---:| +| `sleep` | `pre_sleep` | v2.15.0 | + ## License All files in this repository is licensed under the [MIT License](LICENSE) and copyright © Casper Welzel Andersen. diff --git a/action.yml b/action.yml index bebb17c..8bb8333 100644 --- a/action.yml +++ b/action.yml @@ -64,6 +64,12 @@ inputs: description: 'If set to true, the action will fail as soon as a check fails. If set to false (default), the action will wait for all checks to complete before failing.' required: false default: 'false' + + # DEPRECATED + sleep: + description: "DEPRECATED! Use 'pre_sleep'. Time (in seconds) the action should wait until it will start 'waiting' and check the list of running actions/checks. This should be an appropriate number to let the checks start up" + required: false + default: '' runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.sh b/entrypoint.sh index 370e2cc..49668ec 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -11,6 +11,14 @@ esac set -e +if [ -n "${INPUT_SLEEP}" ]; then + echo "::warning title=Deprecated input::The 'sleep' input is deprecated. Please use 'pre_sleep' instead." + if [ -z "${INPUT_PRE_SLEEP}" ] || [ "${INPUT_PRE_SLEEP}" == "5" ]; then + # If `pre_sleep` is not defined, or is the default value, use the deprecated `sleep` input value + INPUT_PRE_SLEEP=${INPUT_SLEEP} + fi +fi + # Utility functions ere_quote() { sed 's/[][\.|$(){}?+*^]/\\&/g' <<< "$*"