firebelley / godot-export

Automatically exports your Godot games.
MIT License
486 stars 59 forks source link

Failed to add secret. Secret names must not start with GITHUB_. #62

Closed guysoft closed 3 years ago

guysoft commented 3 years ago

Hey, When I try to add the env secret I get this error: "Failed to add secret. Secret names must not start with GITHUB_. "

The env variable is GITHUB_TOKEN

Here is a screenshot: Screenshot_20210805_182258

There is some info about this when triggering from a forked repo (which I am): https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow

firebelley commented 3 years ago

Hello,

secrets.GITHUB_TOKEN is typically available automatically. If it is not for some reason (perhaps because of a forked repo) then you should manually add the secret and give it a name that does not include GITHUB_. Then include it in the workflow like so:

env:
        GITHUB_TOKEN: ${{ secrets.MY_CUSTOM_SECRET_TOKEN }}

Hope that helps!

guysoft commented 3 years ago

Thanks for explaining! :) perhaps its worth mentioning in the docs that that value needs to change in a forked repo.