Skip to content

Commit

Permalink
Merge pull request #58 from MichaelDeBoey/patch-1
Browse files Browse the repository at this point in the history
feat: default `repo-token` to `github.token`
  • Loading branch information
developit authored Jun 21, 2021
2 parents ce372b9 + ca47a23 commit fa703d2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
4 changes: 0 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
```
### Customizing the Build
Expand Down Expand Up @@ -66,7 +64,6 @@ jobs:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ build-script: "ci"
```

Expand All @@ -84,7 +81,6 @@ jobs:
- uses: actions/checkout@v2
- uses: preactjs/compressed-size-action@v2
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
+ pattern: "./build-output/**/*.{js,css,html,json}"
+ exclude: "{./build-output/manifest.json,**/*.map,**/node_modules/**}"
```
Expand Down
3 changes: 2 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ branding:
inputs:
repo-token:
description: 'The GITHUB_TOKEN secret'
required: true
required: false
default: ${{ github.token }}
build-script:
description: 'The npm-script to run that builds your project'
default: 'build'
Expand Down
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ async function createCheck(octokit, context) {

(async () => {
try {
const token = getInput('repo-token', { required: true });
const token = getInput('repo-token');
const octokit = getOctokit(token);
await run(octokit, context, token);
} catch (e) {
Expand Down

0 comments on commit fa703d2

Please sign in to comment.