How to verify that it is GITHUB_TOKEN? #25411
-
I verify whether it is But it returns false, How can I verify the token is GITHUB_TOKEN ? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
There is no any default environment variable named “ACTIONS_RUNTIME_TOKEN” for the GITHUB_TOKEN secret.
The GITHUB_TOKEN secret has the following usage limitation: To verify whether a token is the GITHUB_TOKEN, you can use above points. |
Beta Was this translation helpful? Give feedback.
-
@brightran, |
Beta Was this translation helpful? Give feedback.
-
As I mentioned in that topic, we seem have no available methods to list all the access scopes of a token.
@tombrus, We seem have no available methods to list all the access scopes of a token. I tried using the OAuth Authorizations API, but did not work. If you are the authenticated user of the token, you can try to navigate to Personal settings > Developer settings > Personal access tokens to view the access scopes of the tokens you have created. |
Beta Was this translation helpful? Give feedback.
@yi-Xu-0100,
There is no any default environment variable named “ACTIONS_RUNTIME_TOKEN” for the GITHUB_TOKEN secret.
If you want to access the GITHUB_TOKEN secret via an environment variable, you need to map it as an environment variable in the workflow.
For example:
The GITHUB_TOKEN secret has the following usage limitation:
The permissions of the GITHUB_TOKEN are limited to the repository that contains your workflow.
When you use the repository’s GITHUB_TOKEN to perform tasks on behalf of the GitHub Actions app, events triggered by the GITHUB_TOKEN will not create a new workflow run.
To verify whether a token is the GITHUB_TOKEN,…