Aller au contenu principal

GitHub token input

Input

Name: github-token
Type: string
Default value: ${{ github.token }}

Description

This input will let you define what GitHub token to use to perform the calls to the GitHub API.
You can also read the automatic token authentication to have more information.

attention

Based on your configuration, make sure to give the proper permissions to your GitHub token.
If not, you may end up having weird behaviours, where some data will be missing from the queries.

Note that if you have unusual behaviours, a debug log is exposing the queried data from your issues and pull requests.
This may be very helpful to debug your workflow, before creating a new issue.

The minimum permissions are:

  • contents: read

And based on your configuration, you have a great chance to also need:

  • issues: write
  • pull-requests: write
  • repository-projects: read
info

Under the hood, the value will be consumed by the @actions/github, through the getOctokit method.

Example

# ...
name: Stale
id: stale
uses: sonia-corporation/stale@latest
with:
github-token: ${{ env.GITHUB_TOKEN }}