Skip to content

Commit e734ee1

Browse files
committed
Avoid running "Publish Tester Build" workflow on tag push
In order to provide coverage for projects using release branches, the "Publish Tester Build" workflow has a `create` event trigger. This trigger is intended to cause the workflow to run on the creation of a release branch. The same `create` event also occurs when a tag is pushed to the repository. There is no need to generate a tester build for tags because these are only made after the project is in a fully tested state and the tag push will trigger a release build that makes a generated tester build superfluous anyway. For this reason, and because the triggering of the tester build on this event can cause problems in some project, the workflow is configured to skip the generation of the tester build when it was triggered by a tag push.
1 parent 01d49fc commit e734ee1

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

.github/workflows/publish-go-tester-task.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,12 @@ jobs:
3636
id: determination
3737
run: |
3838
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
39+
TAG_REGEX="refs/tags/.*"
3940
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
4041
if [[
4142
("${{ github.event_name }}" != "create" ||
42-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX)
43+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX) &&
44+
! "${{ github.ref }}" =~ $TAG_REGEX
4345
]]; then
4446
# Run the other jobs.
4547
RESULT="true"

0 commit comments

Comments
 (0)