From dee8819dcc9726c5b233a5f12b08c385c7da77dd Mon Sep 17 00:00:00 2001 From: MatteoPologruto Date: Wed, 7 Dec 2022 11:55:57 +0100 Subject: [PATCH] Avoid running publish-go-tester-task if tag is set --- workflow-templates/publish-go-tester-task.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/workflow-templates/publish-go-tester-task.yml b/workflow-templates/publish-go-tester-task.yml index 92d720fa..589aadc0 100644 --- a/workflow-templates/publish-go-tester-task.yml +++ b/workflow-templates/publish-go-tester-task.yml @@ -39,10 +39,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.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX) && + ! "${{ github.ref }}" =~ $TAG_REGEX ]]; then # Run the other jobs. RESULT="true"