Skip to content

Commit

Permalink
Use default value if github-token is not given (#523)
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jun 27, 2023
1 parent c9d9b1b commit 076808b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/itself.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,5 +38,3 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: ./
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
12 changes: 5 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'
Expand All @@ -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` | |
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 076808b

Please sign in to comment.