Skip to content

Commit b90916b

Browse files
Avoid running publish-go-tester-task if tag is set
1 parent 210dda4 commit b90916b

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
Original file line numberDiff line numberDiff line change
@@ -35,14 +35,21 @@ jobs:
3535
outputs:
3636
result: ${{ steps.determination.outputs.result }}
3737
steps:
38+
- name: Checkout repository
39+
uses: actions/checkout@v3
40+
with:
41+
fetch-depth: 0
42+
3843
- name: Determine if the rest of the workflow should run
3944
id: determination
4045
run: |
4146
RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x"
47+
TAG="$(git tag --points-at=HEAD 2> /dev/null | head -n1)"
4248
# The `create` event trigger doesn't support `branches` filters, so it's necessary to use Bash instead.
4349
if [[ \
44-
"${{ github.event_name }}" != "create" || \
45-
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX \
50+
("${{ github.event_name }}" != "create" || \
51+
"${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX) && \
52+
"$TAG" == "" \
4653
]]; then
4754
# Run the other jobs.
4855
RESULT="true"

0 commit comments

Comments
 (0)