Skip to content

Commit 3a6ed44

Browse files
committed
Remove need to explicitly pass GITHUB_TOKEN
1 parent 3ef9497 commit 3a6ed44

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

README.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ jobs:
4040
https://example.com/
4141
https://example.com/about
4242
label: 'GitHub Action Test'
43-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4443
```
4544
4645
3. Open a Pull Request. WebPageTest's GitHub Action will run in the background and post a comment on your PR.
@@ -89,7 +88,6 @@ jobs:
8988
https://example.com/about
9089
label: 'GitHub Action Test'
9190
budget: 'wpt-budget.json'
92-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
9391
```
9492

9593
And a `wpt-budget.json` file containing:
@@ -142,7 +140,6 @@ jobs:
142140
label: 'GitHub Action Test'
143141
budget: 'wpt-budget.json'
144142
wptOptions: 'wpt-options.json'
145-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
146143
```
147144

148145
_If you are testing against a Netlify deployment preview, it's important to note that the new collaborative features for their previews inject a full single-page application into your page, messing with any performance thresholds you might be trying to enforce. Add the following to your wptOptions JSON to make sure none of the extra code makes it into your test results_
@@ -179,7 +176,6 @@ jobs:
179176
label: 'GitHub Action Test'
180177
budget: 'wpt-budget.json'
181178
wptOptions: 'wpt-options.json'
182-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
183179
```
184180

185181
And a `wpt-options.json` file containing:

action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ inputs:
1919
required: false
2020
GITHUB_TOKEN:
2121
description: 'Secret GitHub Token (automatically provided by GitHub)'
22+
default: ${{ github.token }}
2223
runs:
2324
using: 'node12'
2425
main: 'index.js'

0 commit comments

Comments
 (0)