From 466e157587dda5c3e48fb24d8dffa3b2e09f4344 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 15 Jun 2021 00:07:13 +0200 Subject: [PATCH 1/3] feat: default `github_token` to `github.token` --- action.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/action.yml b/action.yml index 42bd3ed..9d11e91 100644 --- a/action.yml +++ b/action.yml @@ -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' From fad098b28effedb8adf9fb526b0f993dade655b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 15 Jun 2021 00:10:12 +0200 Subject: [PATCH 2/3] Update README.md --- README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/README.md b/README.md index b0d5c87..eb89352 100644 --- a/README.md +++ b/README.md @@ -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 ``` @@ -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 ``` @@ -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/ From 4521bb43e647c6a6012d6a2de6753e9f94be2aae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20De=20Boey?= Date: Tue, 15 Jun 2021 00:10:42 +0200 Subject: [PATCH 3/3] Update size.yml --- .github/workflows/size.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/size.yml b/.github/workflows/size.yml index d2cee67..4bc6ce8 100644 --- a/.github/workflows/size.yml +++ b/.github/workflows/size.yml @@ -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 }}