From 076808b0fe86a85206741d44bd33bdcaf159bc40 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Wed, 28 Jun 2023 02:40:45 +0900 Subject: [PATCH] Use default value if `github-token` is not given (#523) --- .github/workflows/itself.yml | 2 -- README.md | 12 +++++------- action.yml | 3 ++- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/.github/workflows/itself.yml b/.github/workflows/itself.yml index bfc01a32..aabea4e3 100644 --- a/.github/workflows/itself.yml +++ b/.github/workflows/itself.yml @@ -38,5 +38,3 @@ jobs: steps: - uses: actions/checkout@v3 - uses: ./ - with: - github-token: '${{ secrets.GITHUB_TOKEN }}' diff --git a/README.md b/README.md index 2e82951a..84498889 100644 --- a/README.md +++ b/README.md @@ -25,7 +25,7 @@ I mainly use this action for below use-case when they should run after multiple ## Usage -Just requires `github-token` for minimum configuration.\ +This is the minimum configuration.\ I recommend to use `timeout-minutes` together with. ```yaml @@ -34,17 +34,15 @@ jobs: runs-on: ubuntu-latest steps: - name: Wait other jobs are passed or failed - uses: kachick/wait-other-jobs@v1.2.1 + uses: kachick/wait-other-jobs@v1.3.0 timeout-minutes: 15 - with: - github-token: "${{ secrets.GITHUB_TOKEN }}" ``` -You can adjust status polling interval and turns early-exit as below. +You can change the token, status polling interval and turns early-exit as below. ```yaml with: - github-token: "${{ secrets.GITHUB_TOKEN }}" + github-token: "${{ secrets.YOUR_PAT }}" min-interval-seconds: '300' # default '30' retry-method: 'equal_intervals' # default 'exponential_backoff' early-exit: 'false' # default 'true' @@ -54,7 +52,7 @@ Full list of the changeable parameters | NAME | DESCRIPTION | TYPE | REQUIRED | DEFAULT | OPTIONS | | ---------------------- | ------------------------------------------------------------------------------- | -------- | -------- | --------------------- | ---------------------------------------- | -| `github-token` | Basically GITHUB_TOKEN | `string` | `true` | `N/A` | | +| `github-token` | The GITHUB_TOKEN secret. You can use PAT if you want. | `string` | `true` | `${{ github.token }}` | | | `min-interval-seconds` | Wait this interval or the multiplied value (and jitter) for next polling | `number` | `false` | `30` | | | `retry-method` | How to wait for next polling | `string` | `false` | `exponential_backoff` | `exponential_backoff`, `equal_intervals` | | `early-exit` | Stop rest pollings if faced at least 1 bad condition | `bool` | `false` | `true` | | diff --git a/action.yml b/action.yml index 1d475724..4e127773 100644 --- a/action.yml +++ b/action.yml @@ -6,8 +6,9 @@ branding: color: 'green' inputs: github-token: - description: 'Basically GITHUB_TOKEN' + description: 'The GITHUB_TOKEN secret' required: true + default: ${{ github.token }} min-interval-seconds: description: 'Wait this interval or the multiplied value (and jitter) for next polling' required: false