bump-sh/github-action

[BUG] BUMP_TOKEN not recognized, You are not allowed to deploy to this documentation

geromegrignon opened this issue · 4 comments

I used this GitHub Action several times as expected but I'm now facing an error about the BUMP_TOKEN:

Error: You are not allowed to deploy to this documentation.
please check your --token flag or BUMP_TOKEN variable

I updated it twice from the documentation Settings page and updated the GitHub secret accordingly but I'm still facing the issue.

Failed job on Github: https://github.com/gothinkster/realworld/runs/4666834360?check_suite_focus=true
Related GitHub workflow: https://github.com/gothinkster/realworld/blob/v2/.github/workflows/bump.yml

Hi Gerome, thanks for this feedback.

We've identified the issue: as you are working on a fork, you don't get the secrets from your main repository (it would work if the branch was in your main repo).

We need to enhance this and make diff correctly working on forks. We have several options in mind, we'll obviously keep you informed as soon as we have fixed the issue.

In the meantime, you can either:

  • temporary remove the api-diff part of your workflow and only keep deploy-doc (which should work as it occurs from your main repo)
  • add the secret to your own fork, but this means that it won't work for other forks

Also, I think it could be a good idea to change the Bump GitHub action version you load in your workflow to bump-sh/github-action@v1 (instead of bump-sh/github-action@v1.0.6) so it can be automatically updated.

Sorry for the issue!

Thanks for the quick feedback.

As forks are the way to contribute to an open-source project for an external contributor, sharing them a secret isn't that much recommended and it would slow down contribution proccess.

I will update the GitHub Action version indeed!

Hi @geromegrignon, thanks for your contribution.

We published a new version of our GH action to be able to solve your problem. You can now use the diff feature of Bump without any authentication (perfect for PR contributions on public repos).

Please check the latest release changelog to see the example GitHub action workflow which should fix your issue: https://github.com/bump-sh/github-action/releases/tag/v1.1.1

Thanks for your patience and please let me know if you need more info 🙂

The issue being staled and with no response, I'm closing it.

Feel free to re-open if you still have an issue 🙏. Thank you!