mikeal/publish-to-github-action

Reserved secret name

Opened this issue · 1 comments

Preamble

I try to create an organization level secret with name GITHUB_TOKEN, then I get back an error that say "Can't use reserved name".

Questions

  1. There are by default prepared GITHUB_TOKEN secret?
  2. It is right to change this secrets.GITHUB_TOKEN into secrets.CI_ACTION_TOKEN?
  3. might it be necessary to mention this in the readme?

Thanks for your HQ work!!

Hi @francescobianco. I'm late so maybe you discovered this, but GITHUB_TOKEN is a secret that GitHub automatically inserts. It's not defined in this project. You could pass your own secret with any other name by changing the right-hand side of the GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} line. Here's the relevant part of the GitHub Actions documentation: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret

GitHub automatically creates a GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run.