Skip to content

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,18 @@ To pin the exact version:
5656
```
5757

5858
The action queries the GitHub API to fetch releases data, to avoid rate limiting,
59-
pass the default token with the `repo-token` variable:
59+
pass the default token with the `repo-token` variable. By default,
60+
the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions.
61+
62+
If the default
63+
[permissions for the GitHub token](https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#permissions-for-the-github_token)
64+
are not sufficient, you can provide a custom GitHub token with the necessary permissions:
6065

6166
```yaml
6267
- name: Install Protoc
6368
uses: arduino/setup-protoc@v3
6469
with:
65-
repo-token: ${{ secrets.GITHUB_TOKEN }}
70+
repo-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
6671
```
6772

6873
## Enable verbose logging for a pipeline

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
default: 'false'
1111
repo-token:
1212
description: 'GitHub repo token to use to avoid rate limiter'
13-
default: ''
13+
default: ${{ github.token }}
1414
outputs:
1515
version:
1616
description: 'Actual version of the protoc compiler environment that has been installed'

0 commit comments

Comments
 (0)