Skip to content

Commit 384e381

Browse files
committed
4746 - avoid extra ci runs
1 parent 9775102 commit 384e381

File tree

1 file changed

+33
-43
lines changed

1 file changed

+33
-43
lines changed

.github/workflows/ci.yml

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ on:
3131
# paths:
3232
# - "**.rs"
3333
# - "**.clar"
34-
pull_request_review:
35-
types:
36-
- submitted
3734

3835
defaults:
3936
run:
@@ -55,15 +52,6 @@ jobs:
5552
## - PR review comment
5653
## - PR change is requested
5754
rustfmt:
58-
if: |
59-
!(
60-
github.event_name == 'pull_request_review' &&
61-
github.event.action == 'submitted' &&
62-
(
63-
github.event.review.state == 'commented' ||
64-
github.event.review.state == 'changes_requested'
65-
)
66-
)
6755
name: Rust Format
6856
runs-on: ubuntu-latest
6957
steps:
@@ -104,22 +92,9 @@ jobs:
10492
##
10593
## Runs when:
10694
## - tag is not provided
107-
## and the following are not true:
108-
## - PR review submitted (not approved)
109-
## and any of:
110-
## - PR review comment
111-
## - PR change is requested
11295
docker-image:
11396
if: |
114-
inputs.tag == '' &&
115-
!(
116-
github.event_name == 'pull_request_review' &&
117-
github.event.action == 'submitted' &&
118-
(
119-
github.event.review.state == 'commented' ||
120-
github.event.review.state == 'changes_requested'
121-
)
122-
)
97+
inputs.tag == ''
12398
name: Docker Image (Source)
12499
uses: ./.github/workflows/image-build-source.yml
125100
needs:
@@ -133,19 +108,13 @@ jobs:
133108
## or:
134109
## - no tag provided
135110
## and any of:
136-
## - PR is approved (any approval will trigger)
137111
## - this workflow is called manually
138112
## - PR is opened
139113
## - commit to either (development, master) branch
140114
create-cache:
141115
if: |
142116
inputs.tag != '' || (
143117
inputs.tag == '' && (
144-
(
145-
github.event_name == 'pull_request_review' &&
146-
github.event.action == 'submitted' &&
147-
github.event.review.state == 'approved'
148-
) ||
149118
github.event_name == 'workflow_dispatch' ||
150119
github.event_name == 'pull_request' ||
151120
github.event_name == 'merge_group' ||
@@ -168,16 +137,28 @@ jobs:
168137
##
169138
## Runs when:
170139
## - tag is provided
171-
## either or of the following:
172-
## - tag is not provided
173-
## - PR is approved
140+
## or:
141+
## - no tag provided
142+
## and any of:
143+
## - this workflow is called manually
144+
## - PR is opened
145+
## - PR added to merge queue
146+
## - commit to either (development, next, master) branch
174147
stacks-core-tests:
175148
if: |
176149
inputs.tag != '' || (
177-
inputs.tag == '' || (
178-
github.event_name == 'pull_request_review' &&
179-
github.event.action == 'submitted' &&
180-
github.event.review.state == 'approved'
150+
inputs.tag == '' && (
151+
github.event_name == 'workflow_dispatch' ||
152+
github.event_name == 'pull_request' ||
153+
github.event_name == 'merge_group' ||
154+
(
155+
contains('
156+
refs/heads/master
157+
refs/heads/develop
158+
refs/heads/next
159+
', github.event.pull_request.head.ref) &&
160+
github.event_name == 'push'
161+
)
181162
)
182163
)
183164
name: Stacks Core Tests
@@ -189,10 +170,18 @@ jobs:
189170
bitcoin-tests:
190171
if: |
191172
inputs.tag != '' || (
192-
inputs.tag == '' || (
193-
github.event_name == 'pull_request_review' &&
194-
github.event.action == 'submitted' &&
195-
github.event.review.state == 'approved'
173+
inputs.tag == '' && (
174+
github.event_name == 'workflow_dispatch' ||
175+
github.event_name == 'pull_request' ||
176+
github.event_name == 'merge_group' ||
177+
(
178+
contains('
179+
refs/heads/master
180+
refs/heads/develop
181+
refs/heads/next
182+
', github.event.pull_request.head.ref) &&
183+
github.event_name == 'push'
184+
)
196185
)
197186
)
198187
name: Bitcoin Tests
@@ -228,3 +217,4 @@ jobs:
228217
- rustfmt
229218
- create-cache
230219
uses: ./.github/workflows/slow-tests.yml
220+

0 commit comments

Comments
 (0)