Skip to content

Commit 7472485

Browse files
chore: change access_token to optional (#72)
1 parent 384c570 commit 7472485

File tree

3 files changed

+3
-7
lines changed

3 files changed

+3
-7
lines changed

README.md

-4
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@ jobs:
2121
steps:
2222
- name: Cancel Previous Runs
2323
uses: styfle/[email protected]
24-
with:
25-
access_token: ${{ github.token }}
2624
#- name: Run Tests
2725
# uses: actions/setup-node@v1
2826
# run: node test.js
@@ -48,7 +46,6 @@ jobs:
4846
- uses: styfle/[email protected]
4947
with:
5048
workflow_id: 479426
51-
access_token: ${{ github.token }}
5249
```
5350
5451
- _Note_: `workflow_id` can be a Workflow ID (number) or Workflow File Name (string)
@@ -119,7 +116,6 @@ jobs:
119116
- uses: styfle/[email protected]
120117
with:
121118
all_but_latest: true
122-
access_token: ${{ github.token }}
123119
```
124120

125121
### Advanced: Token Permissions

action.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@ inputs:
1414
default: 'false'
1515
access_token:
1616
description: 'Your GitHub Access Token, defaults to: {{ github.token }}'
17-
default: '${{ github.token }}'
18-
required: true
17+
default: ${{ github.token }}
18+
required: false
1919
all_but_latest:
2020
description: "Cancel all actions but the last one"
2121
required: false

src/index.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ async function main() {
3030
}
3131

3232
console.log({ eventName, sha, headSha, branch, owner, repo, GITHUB_RUN_ID });
33-
const token = core.getInput('access_token', { required: true });
33+
const token = core.getInput('access_token');
3434
const workflow_id = core.getInput('workflow_id', { required: false });
3535
const ignore_sha = core.getBooleanInput('ignore_sha', { required: false });
3636
const all_but_latest = core.getBooleanInput('all_but_latest', { required: false });

0 commit comments

Comments
 (0)