From 3682b366b0e69c7108d5cf991efe7034ea0dd56d Mon Sep 17 00:00:00 2001 From: Ivan Dlugos Date: Fri, 4 Mar 2022 14:43:50 +0100 Subject: [PATCH] refactor: rename waitTimeout to wait-timeout --- .github/workflows/test.yml | 4 ++-- README.md | 6 ++---- action.yml | 2 +- dist/index.js | 2 +- src/constants.ts | 2 +- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d2abd60..3babab0 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -163,7 +163,7 @@ jobs: with: name: 'Artifact-wait-${{ matrix.runs-on }}' path: some/new/path - waitTimeout: 600 + wait-timeout: 600 # Test downloading an artifact using tilde expansion - name: Download artifact A @@ -214,7 +214,7 @@ jobs: uses: ./ with: path: some/other/path - waitTimeout: 600 + wait-timeout: 600 - name: Verify successful download run: | diff --git a/README.md b/README.md index feb9f44..6119f8c 100644 --- a/README.md +++ b/README.md @@ -137,7 +137,7 @@ steps: # Waiting for the artifact to be available -You can specify `waitTimeout` (seconds) to instruct the download/artifact to retry until the artifact is available. +You can specify `wait-timeout` (seconds) to instruct the download-artifact action to retry until the artifact is available. This is useful if you want to launch the job before its dependency job has finished, e.g. if the dependant requires some time-consuming steps. You can do this by removing the `needs` dependency and relying on the retry logic of download-artifact to fetch the artifact after it's uploaded. @@ -169,11 +169,9 @@ jobs: name: artifact-name path: output-path # wait for 300 seconds - waitTimeout: 300 + wait-timeout: 300 ``` -> Note: The `id` defined in the `download/artifact` step must match the `id` defined in the `echo` step (i.e `steps.[ID].outputs.download-path`) - # Limitations ### Permission Loss diff --git a/action.yml b/action.yml index 4058486..3973cb8 100644 --- a/action.yml +++ b/action.yml @@ -8,7 +8,7 @@ inputs: path: description: 'Destination path' required: false - waitTimeout: + wait-timeout: description: 'Wait for the artifact to become available (timeout in seconds)' required: false runs: diff --git a/dist/index.js b/dist/index.js index 9e629cb..7b3e0c8 100644 --- a/dist/index.js +++ b/dist/index.js @@ -6954,7 +6954,7 @@ var Inputs; (function (Inputs) { Inputs["Name"] = "name"; Inputs["Path"] = "path"; - Inputs["WaitTimeout"] = "waitTimeout"; + Inputs["WaitTimeout"] = "wait-timeout"; })(Inputs = exports.Inputs || (exports.Inputs = {})); var Outputs; (function (Outputs) { diff --git a/src/constants.ts b/src/constants.ts index 3fa2012..d6f3b65 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -1,7 +1,7 @@ export enum Inputs { Name = 'name', Path = 'path', - WaitTimeout = 'waitTimeout' + WaitTimeout = 'wait-timeout' } export enum Outputs { DownloadPath = 'download-path'