-
Notifications
You must be signed in to change notification settings - Fork 0
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
Use gh auth token for default GITHUB_TOKEN secret #43
Conversation
hasGitHubToken := false | ||
for k := range secrets { | ||
if strings.EqualFold(k, "GITHUB_TOKEN") { | ||
hasGitHubToken = true | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workaround for secret file reading incorrect case sensitive handling
Codecov ReportAttention: Patch coverage is
|
You can test this by running on: push
jobs:
_:
runs-on: self-hosted
steps:
- run: echo "$([[ "${{ github.token }}" = "$(gh auth token)" ]] && echo true || echo false)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
I'm still learning to use GitHub secrets, but the code looks correct.
Thanks for your review |
Simplify first time setup by providing the auth token of the gh cli