Interview Prep/GitHub Actions/Triggers & Events

How do `branches` and `branches-ignore` filters work with globs?

BeginnerConceptTriggers & Events
Answer

They accept glob patterns: * matches anything except /, ** matches anything including /, and ! negates within branches (order matters; later patterns override earlier). You cannot use branches and branches-ignore for the same event.

on:
  push:
    branches:
      - main
      - "release/**"
      - "!release/**-alpha"
All GitHub Actions questions Roadmap: GitHub Actions

More on Triggers & Events