Cannot override GITHUB_TOKEN
for Crowdin GitHub Action when using custom tokens
#264
Labels
GITHUB_TOKEN
for Crowdin GitHub Action when using custom tokens
#264
Describe the bug
The Crowdin GitHub Action's documentation suggests setting up the token like this:
However, all
env
variables starting withGITHUB_
cannot be overwritten by user-provided values. This results in the action not accepting tokens from a GitHub App (or PAT) when attempting to pass it asGH_TOKEN
, and the action defaults to the system-providedGITHUB_TOKEN
instead.To Reproduce
Steps to reproduce the behavior:
secrets.GH_TOKEN
with a token generated by a GitHub App (or a personal token).crowdin.yml
file contentExpected behavior
I expected the GitHub Action to allow using a custom token (e.g., one generated by a GitHub App) by binding it to
GITHUB_TOKEN
as documented.Additional context
This issue arises because GitHub automatically sets certain environment variables, including
GITHUB_TOKEN
, and does not allow users to overwrite them. As a workaround, the documentation should suggest using a non-reserved variable name (e.g., GH_TOKEN).Source: https://docs.github.com/en/actions/writing-workflows/choosing-what-your-workflow-does/store-information-in-variables#default-environment-variables
The text was updated successfully, but these errors were encountered: