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:
4
.github/workflows/code-quality.yml
vendored
4
.github/workflows/code-quality.yml
vendored
@@ -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:
|
||||||
|
|||||||
4
.github/workflows/phpunit.yml
vendored
4
.github/workflows/phpunit.yml
vendored
@@ -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:
|
||||||
|
|||||||
4
.github/workflows/playground-tests.yml
vendored
4
.github/workflows/playground-tests.yml
vendored
@@ -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:
|
||||||
|
|||||||
Reference in New Issue
Block a user