refusing to allow a GitHub App to create or update workflow `.github/workflows/rating-chart.yml` without `workflows` permission
See original GitHub issueThanks for the repo. I am using this to add and commit my README.md using workflows … I am able to successfully commit and push README.md however, I am not able to push workflows YAML file which fails with a permission issue, even though commit and add works fine here. The issue is :
! [remote rejected] master -> master (refusing to allow a GitHub App to create or update workflow .github/workflows/rating-chart.yml
without workflows
permission)
I have tried adding a secret environment variable of a new token with workflow scope as well. There seems to be no improvement (I am guessing workflow scope in a token vs workflow permission are two separate things, but I may be wrong)
Can you let me know how this can be resolved. Here is my repo - https://github.com/sciencepal/sciencepal Here is a sample workflow (Check internal logs of add-and-commit job step) - https://github.com/sciencepal/sciencepal/runs/984418665
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:5 (2 by maintainers)
Top GitHub Comments
Found the issue !! I was doing using actions/checkout to pull the repo. It was using the default GITHUB_TOKEN. Changed it to use my personal token with workflows scope as well … worked seamlessly … only interesting thing is that now in every run my wf file is getting updated which in turn is triggering another run … in an endless loop xD. Not sure how I can prevent this 😃
@sciencepal Happy to hear that 😉 Regarding the endless loop: I think the easiest way to prevent it is to exclude the workflow itself and the README file from the push event path:
If that doesn’t work for you you’ll need to find a way to detect whether the change has been made by the action…