CodexBloom - Programming Q&A Platform

GitHub Actions not triggering on branch rename in protected branch setting

πŸ‘€ Views: 148 πŸ’¬ Answers: 1 πŸ“… Created: 2025-07-11
github github-actions ci YAML

I recently switched to I'm not sure how to approach I've spent hours debugging this and I'm not sure how to approach I'm having an scenario with my GitHub Actions workflow not triggering after renaming a branch that is protected. The workflow is supposed to run on `push` events to the `main` branch, but after renaming it from `master` to `main`, it seems like pushes to `main` are being ignored by the Actions system. I checked the workflow configuration file located in `.github/workflows/ci.yml` and it looks like this: ```yaml name: CI on: push: branches: - main jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Run build run: echo "Building..." ``` I also verified that the branch is correctly named `main` in the repository settings, and I ensured that the settings for branch protection allow the Actions to run. I’ve tried pushing changes to other files, but I’m still not seeing any workflows triggered. I even performed a manual dispatch to ensure everything else is functioning but it doesn’t seem to solve the question. I looked at the repository settings and the webhook delivery logs, which indicate that no events are being sent when I push to the `main` branch. Has anyone encountered this scenario after renaming a branch and found a solution? Any insights would be greatly appreciated! I'm working with Yaml in a Docker container on Windows 11. Any feedback is welcome! I'm working on a web app that needs to handle this. Hoping someone can shed some light on this. I'm coming from a different tech stack and learning Yaml.