-
Notifications
You must be signed in to change notification settings - Fork 6
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
For GitHub token storing, also mention usethis function? #31
Comments
This is more a general issue on reconfiguring the currently hard-coded assumption that tokens are stored as local envvars. Need to implement the full range of possibilities via |
Right, even better! |
Also, I was a bit put off when asked to only use one token (I had |
It's a code issue - GitHub itself via the |
@mpadge What ever you name that envvar, let me know so I can change the action to set the correct one :) |
You don't need to in an action - it will use the token associated with the repo, which is the default org token. Current code will work with any token which contains "GITHUB" - the code is here: Line 55 in f4f6591
The token associated with each repo in any action is always called "GITHUB_TOKEN", so will always be found. |
As far as I know (and experienced) the token is not automatically set as an env var but can be accessed from actions via |
The proper way to set and use it is illustrated in
(The "GITHUB_PAT" line in that workflow is only because those r-lib/acions workflows haven't yet been updated to v2.)
|
For a javasctript-action this is the right way but with a 'composite'-type action it is not possible to pass anything to the docker container via arguments/inputs, just files or envvars (which in our case is only set for that step). And using a 'docker'-type action (which is distinct in that you have to do everything within the container and can't use e.g. |
Hm, yeah right ... There are some other, longer-term visions for what we want and need from a containerised action here. I've sent you an email with a link for the two of us to chat a bit more about this. Really appreciate all the thought and input here! |
https://usethis.r-lib.org/reference/github-token.html
The text was updated successfully, but these errors were encountered: