uses: zhengbangbo/update-repository-description@v1.0.0
with:
repo-token: ${{ secrets.MY_TOKEN }}
Note
This job failed due to the following 3 points:
- The default permissions granted to
GITHUB_TOKEN
.- The workflows have read permissions in the repository for the contents and packages scopes only by default, which means to be restricted.
- The related REST API belongs to the administration scope.
Summarized above, there are 3 ways to set the
repo-token
:
- Select workflow permissions settings of a repo to the Read and write permissions option.
- Generate a fine-grained personal access token with:
- All repositionries of repository access.
- Read and write access to Adminstration of repository permissions.
- Edit the
ci.yml
withpermissions.contents: write
. related.
MIT