Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Secrets in a github repo shouldn't start with GITHUB_ #15

Closed
AlyaGomaa opened this issue Jan 23, 2023 · 3 comments
Closed

Secrets in a github repo shouldn't start with GITHUB_ #15

AlyaGomaa opened this issue Jan 23, 2023 · 3 comments

Comments

@AlyaGomaa
Copy link

i guess GITHUB_TOKEN in README.md should be changed

@devenes
Copy link
Contributor

devenes commented Jan 28, 2023

Hello @AlyaGomaa,

GitHub provides a token that you can use to authenticate on behalf of GitHub Actions. At the start of each workflow run, GitHub automatically creates a unique GITHUB_TOKEN secret to use in your workflow. You can use the GITHUB_TOKEN to authenticate in a workflow run.

You can use the GITHUB_TOKEN by using the standard syntax for referencing secrets: ${{ secrets.GITHUB_TOKEN }}. Examples of using the GITHUB_TOKEN include passing the token as an input to an action, or using it to make an authenticated GitHub API request.

Usage example:

name: Pull request labeler
on: [ pull_request ]

jobs:
  triage:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v4
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

You can find more information here: https://docs.github.com/en/actions/security-guides/automatic-token-authentication

@AlyaGomaa
Copy link
Author

AlyaGomaa commented Jun 28, 2023

oh ok,
reading this in the readme gave me the impression that all secrets can start with GITHUB_ which is not true I guess?
thank you!

@devenes
Copy link
Contributor

devenes commented Jun 29, 2023

Yepp this is the only exception.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants