Closed flakey5 closed 7 months ago
The deploy step is failing https://github.com/nodejs/release-cloudflare-worker/actions/runs/6933469355/job/18859682904, I assumed secrets.GH_USER_TOKEN
would work automatically but that looks to not be the case. How can we go about adding it
Is my help needed here? I can add a token if still needed
The deploy step is failing nodejs/release-cloudflare-worker/actions/runs/6933469355/job/18859682904, I assumed
secrets.GH_USER_TOKEN
would work automatically but that looks to not be the case. How can we go about adding it
You can simply just add the example mentioned there. But in general, these should be triggered on the "behalf" of an user. Adding the default token there might give an error that this Token has no access to this resource. Pretty much because GitHub Actions Tokens have access/scope only for that specific GitHub Workflow and Run.
GH_USER_TOKEN
is not the token generated by GitHub actions. If you want to use that one, it's GITHUB_TOKEN
GH_USER_TOKEN
is not the token generated by GitHub actions. If you want to use that one, it'sGITHUB_TOKEN
Right, yes. We need to pretty much then provide an user token.
The workflow did not fail due to credentials, it failed because main is a protectd branch:
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request. 3 of 3 required status checks are expected.
The workflow did not fail due to credentials, it failed because main is a protectd branch:
remote: error: GH006: Protected branch update failed for refs/heads/main.
remote: error: Changes must be made through a pull request. 3 of 3 required status checks are expected.
Huh? Interesting. We could bypass the rule for github actions (user I think?)
yes, I am looking into this now
I suggest to work with pull requests, even for automation. You can enable auto-merge in the repo settings and do something like this in a workflow (assuming token with enough permissions):
# somehow create a branch and commit
gh pr create --title "title" --body ""
gh pr merge --auto --squash
Closes #66