Open cderv opened 2 weeks ago
🤔 I got this when adding env
Error: [@octokit/auth-action] The token variable is specified more than once. Use either `with.token`, `with.GITHUB_TOKEN`, or `env.GITHUB_TOKEN`. See https://github.com/octokit/auth-action.js#createactionauth
So possibly with.token
was already taken into account.
Not sure what changed, but I recently get pandoc nightly download to fail. Here is the debug logging
from https://github.com/rstudio/rmarkdown/actions/runs/9518128513/job/26246875020#step:7:47
I am wondering if the
token
input is correctly passed to the API call 🤔gh
CLI locally it worksgh api /repos/jgm/pandoc/actions/artifacts/1601304781/zip > nightly.zip
I don't know a lot about
@action/core
but I see we do this for nightly https://github.com/r-lib/actions/blob/fbafc3bc4ba114e72680c71e835c59b022606c46/setup-pandoc/src/setup-pandoc.ts#L111and so we create octokit without the GITHUB_TOKEN.
There is a function to get Auth Header https://github.com/r-lib/actions/blob/fbafc3bc4ba114e72680c71e835c59b022606c46/setup-pandoc/src/setup-pandoc.ts#L92-L100
but it is not used in the script... So I wonder.
Is
token
input really used ? Or should we authenticate another way ?I have seen in https://github.com/octokit/action.js/ that maybe setting GITHUB_TOKEN env could work so trying that now. https://github.com/rstudio/rmarkdown/pull/2559