Skip to content

Commit ea91904

Browse files
committed
Do full run of "Arduino IDE" workflow on tag push
The project was recently switched to using a "trunk-based" development strategy. This necessitated some adjustments to the configuration of the GitHub Actions workflows in order to ensure the CI system could be used to effectively validate the project at the state staged for release in the release branch. A `run-determination` job was added to the workflow. This job determines whether the conditions under which the workflow was triggered indicate that the rest of the jobs in the workflow should be run. A validation workflow should run fully under any of the following conditions: - The trigger event was something other than a branch creation - The trigger event was a release branch creation Since the project is fully validated prior to a release, running the workflow when triggered by a release tag is pointless (and even harmful in some specific standardized workflows not currently used in this repository), so (even if for no other reason than efficiency) verification workflows are configured to not run under these conditions. The standardized Arduino tooling workflows follow a modular design where each workflow has a narrow scope of purpose. That path was not taken by those who set up the infrastructure for this repository. They instead created a single massive monolithic "Arduino IDE" workflow that performs many unrelated operations under various conditions. This workflow generates releases in addition to doing validation. Even though it is pointless to run the workflow's validation operations when the workflow is triggered by a release tag, it is essential to run it for the release generation. Previously, the code used in the "Arduino IDE" workflow's `run-determination` job was configured as appropriate for a verification workflow. This meant that a release would not be generated on push of a release tag as intended. The bug is fixed by adjusting the code to do a full run of the workflow when triggered by a release tag.
1 parent 57fa18b commit ea91904

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

.github/workflows/build.yml

+2-4
Original file line numberDiff line numberDiff line change
@@ -46,12 +46,10 @@ jobs:
4646
id: determination
4747
run: |
4848
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
49-
TAG_REGEX="refs/tags/.*"
5049
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
5150
if [[
52-
("${{ github.event_name }}" != "create" ||
53-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX) &&
54-
! "${{ github.ref }}" =~ $TAG_REGEX
51+
"${{ github.event_name }}" != "create" ||
52+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX
5553
]]; then
5654
# Run the other jobs.
5755
RESULT="true"

0 commit comments

Comments
 (0)