Skip to content

Commit a2f868e

Browse files
committed
update inputs.tag to check-release.is_release check
1 parent eef7820 commit a2f868e

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ jobs:
6767
outputs:
6868
tag: ${{ steps.check_release.outputs.tag }}
6969
docker_tag: ${{ steps.check_release.outputs.docker_tag }}
70+
is_release: ${{ steps.check_release.outputs.is_release }}
7071
steps:
7172
- name: Check Release
7273
id: check_release
@@ -77,16 +78,11 @@ jobs:
7778
######################################################################################
7879
## Create a tagged github release
7980
##
80-
## Runs when the following is true:
81-
## - the check-release job outputs a non-empty string for:
82-
## - the tag
83-
## - the docker tag
81+
## Runs when:
82+
## - it is a release run
8483
create-release:
8584
if: |
86-
(
87-
needs.check-release.outputs.tag != '' &&
88-
needs.check-release.outputs.docker_tag != ''
89-
)
85+
needs.check-release.outputs.is_release == 'true'
9086
name: Create Release
9187
needs:
9288
- rustfmt
@@ -100,30 +96,31 @@ jobs:
10096
## Build and push Debian image built from source
10197
##
10298
## Runs when:
103-
## - tag is not provided
99+
## - it is not a release run
104100
docker-image:
105101
if: |
106-
inputs.tag == ''
102+
needs.check-release.outputs.is_release == 'false'
107103
name: Docker Image (Source)
108104
uses: ./.github/workflows/image-build-source.yml
109105
needs:
110106
- rustfmt
107+
- check-release
111108
secrets: inherit
112109

113110
## Create a reusable cache for tests
114111
##
115112
## Runs when:
116-
## - tag is provided
113+
## - it is a release run
117114
## or:
118-
## - no tag provided
115+
## - it is not a release run
119116
## and any of:
120117
## - this workflow is called manually
121118
## - PR is opened
122119
## - commit to either (development, master) branch
123120
create-cache:
124121
if: |
125-
inputs.tag != '' || (
126-
inputs.tag == '' && (
122+
needs.check-release.outputs.is_release == 'true' || (
123+
needs.check-release.outputs.is_release == 'false' && (
127124
github.event_name == 'workflow_dispatch' ||
128125
github.event_name == 'pull_request' ||
129126
github.event_name == 'merge_group' ||
@@ -140,23 +137,24 @@ jobs:
140137
name: Create Test Cache
141138
needs:
142139
- rustfmt
140+
- check-release
143141
uses: ./.github/workflows/create-cache.yml
144142

145143
## Tests to run regularly
146144
##
147145
## Runs when:
148-
## - tag is provided
146+
## - it is a release run
149147
## or:
150-
## - no tag provided
148+
## - it is not a release run
151149
## and any of:
152150
## - this workflow is called manually
153151
## - PR is opened
154152
## - PR added to merge queue
155153
## - commit to either (development, next, master) branch
156154
stacks-core-tests:
157155
if: |
158-
inputs.tag != '' || (
159-
inputs.tag == '' && (
156+
needs.check-release.outputs.is_release == 'true' || (
157+
needs.check-release.outputs.is_release == 'false' && (
160158
github.event_name == 'workflow_dispatch' ||
161159
github.event_name == 'pull_request' ||
162160
github.event_name == 'merge_group' ||
@@ -174,12 +172,13 @@ jobs:
174172
needs:
175173
- rustfmt
176174
- create-cache
175+
- check-release
177176
uses: ./.github/workflows/stacks-core-tests.yml
178177

179178
bitcoin-tests:
180179
if: |
181-
inputs.tag != '' || (
182-
inputs.tag == '' && (
180+
needs.check-release.outputs.is_release == 'true' || (
181+
needs.check-release.outputs.is_release == 'false' && (
183182
github.event_name == 'workflow_dispatch' ||
184183
github.event_name == 'pull_request' ||
185184
github.event_name == 'merge_group' ||
@@ -197,6 +196,7 @@ jobs:
197196
needs:
198197
- rustfmt
199198
- create-cache
199+
- check-release
200200
uses: ./.github/workflows/bitcoin-tests.yml
201201

202202
## Test to run on a tagged release
@@ -228,9 +228,11 @@ jobs:
228228
# uses: ./.github/workflows/slow-tests.yml
229229

230230
slow-tests:
231-
if: inputs.tag != ''
231+
if: |
232+
needs.check-release.outputs.is_release == 'true'
232233
name: Slow Tests
233234
needs:
234235
- rustfmt
235236
- create-cache
237+
- check-release
236238
uses: ./.github/workflows/slow-tests.yml

0 commit comments

Comments
 (0)