Interview Prep/GitHub Actions/Contexts, Expressions, Env & Outputs

What is `github.token` vs `secrets.GITHUB_TOKEN`?

BeginnerConceptContexts, Expressions, Env & Outputs
Answer

They are the same token for the current job. secrets.GITHUB_TOKEN is the traditional way to pass it; github.token is available in contexts where secrets is not, such as action defaults (default: ${{ github.token }} in action.yml). Many actions use it automatically unless you pass token:.

All GitHub Actions questions Roadmap: GitHub Actions

More on Contexts, Expressions, Env & Outputs