Skip to content

Commit ec5552f

Browse files
committed
chore(ci): run workflows only on merge to main
1 parent 6450be8 commit ec5552f

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.github/workflows/run_tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Run Tests
22

33
on:
4-
push:
5-
branches: [main]
64
pull_request:
75
branches: [main]
6+
types: [closed]
87

98
jobs:
109
test:
10+
if: github.event.pull_request.merged == true
1111
runs-on: ubuntu-latest
1212

1313
steps:

.github/workflows/todo.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Smart TODO Tracker
22

33
on:
4-
push:
4+
pull_request:
55
branches: [main]
6+
types: [closed]
67

78
workflow_dispatch:
89
inputs:
@@ -42,6 +43,7 @@ on:
4243

4344
jobs:
4445
smart-todo:
46+
if: github.event.pull_request.merged == true
4547
runs-on: ubuntu-latest
4648
permissions:
4749
contents: write

0 commit comments

Comments
 (0)