GH Actions not triggering for Dependabot PRs

My dependabot.yml is specified as so:

version: 2
updates:
  # Enable version updates for npm
  - package-ecosystem: 'npm'
    # Look for `package.json` and `lock` files in the `root` directory
    directory: '/'
    # Check the npm registry for updates every day (weekdays)
    schedule:
      interval: 'daily'

And I register my GitHub actions tests for all branches except master:

name: Test

on:
  push:
    branches:
      - '*'
      - '!master'

jobs:
  ....

The tests run for all PRs I create. Dependabot uses the branch style dependabot/npm_and_yarn/package_org/package-version and merges into master, but the GitHub action is never triggered. Example: https://github.com/two-app/two-app/pull/166

I can’t find other threads with the same issues, but have seen some users running their CI for dependabot PRs. Any ideas?

branches:
  - '*'

* only matches everything up to the first /. It should match the Dependabot branch names if you make it **.

Filter pattern cheat sheet

3 Likes