diff --git a/.github/workflows/hello_world.yml b/.github/workflows/hello_world.yml index b3df1e5..161e720 100644 --- a/.github/workflows/hello_world.yml +++ b/.github/workflows/hello_world.yml @@ -20,7 +20,10 @@ jobs: steps: - name: Validate tag run: | - [[ "${{ inputs.tag_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]] && echo "tag name is ok" + if [[ ! "${{ inputs.tag_name }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "tag is invalid: must be in the form 'v0.0.0'" + exit 1 + fi - name: Create tag uses: actions/github-script@v5 with: