diff --git a/.github/workflows/trigger-tag.yml b/.github/workflows/trigger-tag.yml index 84bb9e9..8205b96 100644 --- a/.github/workflows/trigger-tag.yml +++ b/.github/workflows/trigger-tag.yml @@ -24,7 +24,7 @@ jobs: # and 2022.1.1-dev9 will become 2022.1.1-dev10 - name: Get next dev tag name run: | - LAST_TAG=$(git tag --sort=v:refname --merged ${{ env.BRANCH_NAME }} | grep -e '-dev' | tail -1) + LAST_TAG=$(git tag --sort=v:refname --merged ${{ env.BRANCH_NAME }} | grep -E '^[0-9]{4}\.[0-9]+\.[0-9]+-dev[0-9]+$' | tail -1) echo "NEXT_TAG=$(echo $LAST_TAG | awk -F-dev -v OFS=-dev '{$NF += 1 ; print}')" >> $GITHUB_ENV # Trigger the build - name: Trigger the tagger workflow with branch ${{env.BRANCH_NAME}} and tag ${{ env.NEXT_TAG }}