diff --git a/.github/workflows/test-integration.yml b/.github/workflows/test-integration.yml index 18a7ce12..82ebfbd9 100644 --- a/.github/workflows/test-integration.yml +++ b/.github/workflows/test-integration.yml @@ -81,7 +81,7 @@ jobs: version: v10.x - name: Fail the job if the action run succeeded - if: steps.setup-task.outcome == 'success' + if: steps.setup-protoc.outcome == 'success' run: | echo "::error::The action run was expected to fail, but passed!" exit 1 diff --git a/README.md b/README.md index e384a57e..048081bd 100644 --- a/README.md +++ b/README.md @@ -56,13 +56,18 @@ To pin the exact version: ``` The action queries the GitHub API to fetch releases data, to avoid rate limiting, -pass the default token with the `repo-token` variable: +pass the default token with the `repo-token` variable. By default, +the `GITHUB_TOKEN` secret is used, which is automatically provided by GitHub Actions. + +If the default +[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) +are not sufficient, you can provide a custom GitHub token with the necessary permissions: ```yaml - name: Install Protoc uses: arduino/setup-protoc@v3 with: - repo-token: ${{ secrets.GITHUB_TOKEN }} + repo-token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} ``` ## Enable verbose logging for a pipeline diff --git a/action.yml b/action.yml index 1eaff061..d2c4723d 100644 --- a/action.yml +++ b/action.yml @@ -10,7 +10,7 @@ inputs: default: 'false' repo-token: description: 'GitHub repo token to use to avoid rate limiter' - default: '' + default: ${{ github.token }} outputs: version: description: 'Actual version of the protoc compiler environment that has been installed'