CodexBloom - Programming Q&A Platform

implementing GitHub Actions triggering on `push` events but not on `pull_request` events for specific branches

πŸ‘€ Views: 1450 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-14
github-actions continuous-integration git YAML

I'm working on a project and hit a roadblock... I'm not sure how to approach This might be a silly question, but I've been researching this but I'm experiencing a frustrating scenario with my GitHub Actions workflow where it's properly triggering on `push` events, but it fails to trigger on `pull_request` events for specific branches... My workflow configuration is set to run for both events, yet the `pull_request` events for branches like `feature/new-feature` are ignored. Here’s a snippet of my workflow YAML file: ```yaml name: CI on: push: branches: - main - feature/* pull_request: branches: - main - feature/* jobs: build: runs-on: ubuntu-latest steps: - name: Checkout code uses: actions/checkout@v2 - name: Run lint run: npm run lint ``` I've verified that the branches `feature/new-feature` and `feature/another-feature` exist in my repository and that I have indeed opened pull requests against the `main` branch from these feature branches. However, the actions do not trigger upon opening or updating these pull requests. I checked the Actions tab and there are no logs or errors related to this. I tried: - Adjusting the `branches` under `pull_request` to include `- '*'` to see if it would then capture all branches, but no success. - Reviewing the repository settings to ensure that pull request events are not being restricted somehow. - Ensuring that the actions are enabled for the repository. Has anyone encountered a similar scenario or could there be a specific configuration that I might be overlooking? Any insights would be greatly appreciated! I'm on Ubuntu 20.04 using the latest version of Yaml. Any ideas how to fix this? Hoping someone can shed some light on this. This is my first time working with Yaml 3.10. Any advice would be much appreciated. This is for a application running on Windows 10.