It's easy to run a GitHub Action on any push or pull request:
# Triggers the workflow on push or pull request events
on: [push, pull_request]
But what if I want to restrict runs to pull requests opened against specific base refs, while allowing runs on all branches?
I thought about this:
on:
push:
branches:
- "*"
pull_request:
branches:
- "develop"
- "staging"
But it didn't work. I added this Action to a feature branch and GitHub didn't pick it up.
Is there anything wrong with my glob? Why doesn't '*' work?