Skip to content

Commit 3d676de

Browse files
committed
feat: clarify ci.yml conditionals documentation
1 parent 2d9313b commit 3d676de

File tree

1 file changed

+39
-24
lines changed

1 file changed

+39
-24
lines changed

.github/workflows/ci.yml

Lines changed: 39 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,16 @@ jobs:
5252

5353
######################################################################################
5454
## Check if the branch that this workflow is being run against is a release branch
55+
##
56+
## Outputs:
57+
## - node_tag: Tag of the stacks-node if the branch is a release one (example: release/3.4.0.0.1), null otherwise
58+
## - node_docker_tag: Version of the stacks-node if the branch is a release one (example: 3.4.0.0.1), null otherwise
59+
## - signer_tag: Tag of the stacks-signer if the branch is a release one (example: release/3.4.0.0.1.0), null otherwise
60+
## - signer_docker_tag: Version of the stacks-signer if the branch is a release one (example: 3.4.0.0.1.0), null otherwise
61+
## - is_node_release: True if the branch represents a 'stacks-node' release, false otherwise.
62+
## If this is true, 'is_signer_release' will also be true, since a 'stacks-signer' binary
63+
## is always released alongside 'stacks-node'.
64+
## - is_signer_release: True if the branch represents a 'stacks-signer' release, false otherwise.
5565
check-release:
5666
name: Check Release
5767
needs:
@@ -75,7 +85,7 @@ jobs:
7585
## Create a tagged github release
7686
##
7787
## Runs when:
78-
## - it is a release run
88+
## - it is either a node release or a signer release
7989
create-release:
8090
if: |
8191
needs.check-release.outputs.is_node_release == 'true' ||
@@ -97,9 +107,10 @@ jobs:
97107
## Build and push Debian image built from source
98108
##
99109
## Runs when:
100-
## - it is not a release run
110+
## - it is not a node or signer-only release run
101111
docker-image:
102112
if: |
113+
needs.check-release.outputs.is_node_release != 'true' ||
103114
needs.check-release.outputs.is_signer_release != 'true'
104115
name: Docker Image (Source)
105116
uses: ./.github/workflows/image-build-source.yml
@@ -111,13 +122,11 @@ jobs:
111122
## Create a reusable cache for tests
112123
##
113124
## Runs when:
114-
## - it is a release run
115-
## or:
116-
## - it is not a release run
117-
## and any of:
118-
## - this workflow is called manually
119-
## - PR is opened
120-
## - PR added to merge queue
125+
## - it is a node release run
126+
## or any of:
127+
## - this workflow is called manually
128+
## - PR is opened
129+
## - PR added to merge queue
121130
create-cache:
122131
if: |
123132
needs.check-release.outputs.is_node_release == 'true' ||
@@ -133,15 +142,14 @@ jobs:
133142
## Tests to run regularly
134143
##
135144
## Runs when:
136-
## - it is a release run
137-
## or:
138-
## - it is not a release run
139-
## and any of:
140-
## - this workflow is called manually
141-
## - PR is opened
142-
## - PR added to merge queue
145+
## - it is a node or signer-only release run
146+
## or any of:
147+
## - this workflow is called manually
148+
## - PR is opened
149+
## - PR added to merge queue
143150
stacks-core-tests:
144151
if: |
152+
needs.check-release.outputs.is_node_release == 'true' ||
145153
needs.check-release.outputs.is_signer_release == 'true' ||
146154
github.event_name == 'workflow_dispatch' ||
147155
github.event_name == 'pull_request' ||
@@ -156,15 +164,14 @@ jobs:
156164
## Checks to run on built binaries
157165
##
158166
## Runs when:
159-
## - it is a release run
160-
## or:
161-
## - it is not a release run
162-
## and any of:
163-
## - this workflow is called manually
164-
## - PR is opened
165-
## - PR added to merge queue
167+
## - it is a node or signer-only release run
168+
## or any of:
169+
## - this workflow is called manually
170+
## - PR is opened
171+
## - PR added to merge queue
166172
stacks-core-build-tests:
167173
if: |
174+
needs.check-release.outputs.is_node_release == 'true' ||
168175
needs.check-release.outputs.is_signer_release == 'true' ||
169176
github.event_name == 'workflow_dispatch' ||
170177
github.event_name == 'pull_request' ||
@@ -175,6 +182,14 @@ jobs:
175182
- check-release
176183
uses: ./.github/workflows/core-build-tests.yml
177184

185+
## Checks to run on built binaries
186+
##
187+
## Runs when:
188+
## - it is a node release run
189+
## or any of:
190+
## - this workflow is called manually
191+
## - PR is opened
192+
## - PR added to merge queue
178193
bitcoin-tests:
179194
if: |
180195
needs.check-release.outputs.is_node_release == 'true' ||
@@ -204,7 +219,7 @@ jobs:
204219
## Test to run on a tagged release
205220
##
206221
## Runs when:
207-
## - it is a release run
222+
## - it is a node release run
208223
atlas-tests:
209224
if: needs.check-release.outputs.is_node_release == 'true'
210225
name: Atlas Tests

0 commit comments

Comments
 (0)