Skip to content

Commit 7dbfe30

Browse files
ci: stop double-running test workflows on PR branches (#181)
All seven test-* workflows triggered on both push and pull_request with no branch filter, so every push to a PR branch fired both events: two runs each. Restrict push to main: PR branches now trigger only pull_request, and a merge to main triggers only push. pull_request stays unfiltered so PRs against any base still run. Roughly halves Actions usage for these workflows.
1 parent 8cf2e48 commit 7dbfe30

7 files changed

Lines changed: 13 additions & 6 deletions

File tree

.github/workflows/test-breaking.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: breaking
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
oasdiff_breaking:
78
runs-on: ubuntu-latest

.github/workflows/test-changelog.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: changelog
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
oasdiff_changelog:
78
runs-on: ubuntu-latest

.github/workflows/test-diff.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: diff
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
oasdiff_diff:
78
runs-on: ubuntu-latest

.github/workflows/test-error-annotation.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: error-annotation
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
entrypoint_error_annotation:
78
runs-on: ubuntu-latest

.github/workflows/test-pr-comment.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: pr-comment
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
pr_comment_tolerates_oasdiff_fail_on:
78
runs-on: ubuntu-latest

.github/workflows/test-validate.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
name: validate
22
on:
3-
pull_request:
43
push:
4+
branches: [main]
5+
pull_request:
56
jobs:
67
oasdiff_validate_valid:
78
runs-on: ubuntu-latest

.github/workflows/test-verify.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
name: test verify
22
on:
33
push:
4+
branches: [main]
45
pull_request:
56

67
jobs:

0 commit comments

Comments
 (0)