Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use default value if github-token is not given #523

Merged
merged 1 commit into from
Jun 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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