I've a workflow on my repo that checks for updates every other day from the upstream and if the upstream has any updates i.e., new commits, my workflow will fetch updates from it and rebase my repo with my changes on top of it.
The workflow worked fine until yesterday morning with no issues. All of a sudden, the workflow now fails to update my repo with an error that states workflows
permission is missing. Full error below:
![remote rejected] main -> main (refusing to allow a GitHub App to create or update workflow `.github/workflows/diffuse.yml` without `workflows` permission)
I understand I need to give it the workflow permission but I've a question:
Why is this error even being thrown at me all of a sudden when I've neither created a GitHub App
nor created a PAT
and it was working fine without these.
YAML Code:
- name: Setup Git
run: git config --global user.email ${{ secrets.EMAIL }} && git config --global user.name username
- name: Fetch from Upstream
run: |
git remote add upstream https://github.com/upstream-repo/repo.git
git fetch upstream --tags
# Some extra code here
if [ $has_new_commits == "true" ]; then
git checkout main
git rebase upstream/main || git diff
git push -f origin main
echo "Rebase successful!"
else
echo "ERROR: No commits to be synced!"
exit 1
fi
build_app:
needs: update_fork
uses: ./.github/workflows/build.yml
secrets: inherit
I did tried checking the repo and the settings to see whether I had previously created an App for it by mistake or not. No, I have NEVER created any app for this to give permission. At the repo level, every settings is as expected and intact.
I didn't even change the code to break.
Did GitHub do any changes in their backend that broke my workflow? How can I get my workflow running again?