When setting up automation via Github Actions, try to use secrets.GITHUB_TOKEN might end up throwing the following error message:
Permission to "x" denied to github-actions[bot].
We must enable an option in the project settings to make this work.
Go to your project Settings, under the Actions collapsible, click on General.
Then, scroll down until you find Workflow permissions and mark the option Read and write permissions.
Hit the save button and rerun your pipeline.
In case your action needs to create a pull request, you also will need to enable the option Allow GitHub Actions to create and approve pull requests. Otherwise, you'll face the following error:
Error: HttpError: GitHub Actions is not permitted to create or approve pull requests.
Error: GitHub Actions is not permitted to create or approve pull requests.