-
-
Notifications
You must be signed in to change notification settings - Fork 52
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
Provide default for GITHUB_TOKEN #25
Conversation
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.
Thanks a lot, this is interesting. Do you know if this is the same token as secrets.GITHUB_TOKEN
?
@gomorizsolt could you give both a try? Let's also make sure it's not possible to display this variable in the logs as it's not stored as a secret.
Yep see the documentation:
As for masking, yes, the masking on GitHub is value-based. If the value of the token is printed to the logs for any reason, and it doesn't matter how it got there, the processor of the logs will mask the value before rendering it, including in the "raw" logs. So for example, you could take a secret value, pass it as an environment variable, feed it into a node script, then |
Thanks, that makes sense. |
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.
Sorry for the sluggish reply. Thanks @chancancode for this improvement. I've tested your branch out against my experimental repository and works as expected. Approved from my side.
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.
One more thing: @chancancode, could you please update the doc accordingly? Just remove these lines:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Note: secrets.GITHUB_TOKEN is a repository-level access token already provided by the Actions framework, you don't need to set any secrets.
Since it is set by default, it should be rare to have to customize it.
Done! 🆗 |
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.
Thanks!
See https://github.com/actions/checkout/blob/94c2de77cccf605d74201a8aec6dd8fc0717ad66/action.yml#L24