Fix duplicate CI runs by removing feature/* from push triggers

Workflows were running twice for feature branches: once on push and once
on pull_request. Now push only triggers for main branch, while feature
branches get CI via the pull_request trigger when a PR exists.

This prevents duplicate workflow runs and the confusion of having
one run pass while another fails for the same commit.
This commit is contained in:
2025-11-24 23:44:19 +00:00
parent df7f303ffb
commit 6684375ea3
3 changed files with 9 additions and 3 deletions

View File

@@ -1,8 +1,10 @@
name: Code Quality name: Code Quality
on: on:
# Only run on push to main (not feature branches) to avoid duplicate runs.
# Feature branches get CI via pull_request trigger.
push: push:
branches: [ main, feature/* ] branches: [ main ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
workflow_dispatch: workflow_dispatch:

View File

@@ -1,8 +1,10 @@
name: PHPUnit Tests name: PHPUnit Tests
on: on:
# Only run on push to main (not feature branches) to avoid duplicate runs.
# Feature branches get CI via pull_request trigger.
push: push:
branches: [ main, feature/* ] branches: [ main ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
workflow_dispatch: workflow_dispatch:

View File

@@ -8,8 +8,10 @@ name: WordPress Playground Tests
# npm run playground:start:multisite # npm run playground:start:multisite
on: on:
# Only run on push to main (not feature branches) to avoid duplicate runs.
# Feature branches get CI via pull_request trigger.
push: push:
branches: [ main, feature/* ] branches: [ main ]
pull_request: pull_request:
branches: [ main ] branches: [ main ]
workflow_dispatch: workflow_dispatch: