-
Notifications
You must be signed in to change notification settings - Fork 19
Setting the GITHUB_TOKEN explicitly
Sal edited this page Feb 2, 2024
·
5 revisions
Starting with version 1.2.0
users no longer have to provide any GitHub access token to the action. Instead we read the automatically available github.token
value from the github context as mentioned here.
However if users still want to provide their own token there are two ways to do so.
This is the old school way of passing your access token. You can use the automatically available ${{ secrets.GITHUB_TOKEN }}
secret or provide your own.
- uses: mukunku/[email protected]
id: check-tag
with:
tag: 'v1'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Our action.yml defines an input parameter named github_token
that we don't mention in the readme. It's possible to also provide your access token via this parameter.
- uses: mukunku/[email protected]
id: check-tag
with:
tag: 'v1'
github_token: ${{ secrets.GITHUB_TOKEN }}
Note: If both options are used the environment variable will take precedence.