Skip to content

Commit fd270b9

Browse files
committed
chore: avoid duplicate CI runs on branch push + pull_request
push and pull_request both fired for commits on branches with an open PR in this repo, running each workflow twice. Restrict the push trigger to main so branch work is covered by pull_request alone.
1 parent 80c7aa6 commit fd270b9

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

.github/workflows/js.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: JS Build & Test
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
47

58
jobs:
69
build:

.github/workflows/rubocop.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: Rubocop
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
47

58
jobs:
69
build:

.github/workflows/ruby.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
name: build
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
47

58
jobs:
69
build:

0 commit comments

Comments
 (0)