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

feat: default github_token to github.token #59

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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/size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,3 @@ jobs:
- run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
- uses: ./
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,14 +51,11 @@ jobs:
steps:
- uses: actions/checkout@v1
- uses: andresz1/size-limit-action@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
```
You can optionally specify a custom npm script to run instead of the default `build` adding a `build_script` option to the yml workflow shown above. Additionally, providing a `skip_step` option will tell the action to skip either the `install` or `build` phase.

```yaml
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: custom-build
skip_step: install
```
Expand All @@ -67,7 +64,6 @@ Add `clean_script` option to specify npm script to run after size-limit results

```yaml
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
clean_script: cleanup
```

Expand All @@ -82,7 +78,6 @@ For instance, if `package.json` is in the subfolder `client/`:

```yaml
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
build_script: custom-build
skip_step: install
directory: client/
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:
required: true
required: false
description: 'a github access token'
default: ${{ github.token }}
build_script:
required: false
description: 'a custom npm script to build'
Expand Down