Skip to content

Commit

Permalink
Avoid running "Publish Tester Build" workflow on tag push
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
per1234 committed Jul 19, 2023
1 parent 01d49fc commit e734ee1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/publish-go-tester-task.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,12 @@ jobs:
id: determination
run: |
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
TAG_REGEX="refs/tags/.*"
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
if [[
("${{ github.event_name }}" != "create" ||
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX)
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX) &&
! "${{ github.ref }}" =~ $TAG_REGEX
]]; then
# Run the other jobs.
RESULT="true"
Expand Down

0 comments on commit e734ee1

Please sign in to comment.