diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e13de2f7d..e798c2670 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -39,7 +39,17 @@ jobs: - name: Extract tag name run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV + - name: Validate tag pattern + id: validate_tag + run: | + if [[ "${TAG_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then + echo "TAG_VALID=true" >> $GITHUB_ENV + else + echo "TAG_VALID=false" >> $GITHUB_ENV + fi + - name: Trigger dispatch for obol-docs + if: env.TAG_VALID == 'true' uses: peter-evans/repository-dispatch@v3 with: token: ${{ secrets.OBOL_PLATFORM_PAT }} @@ -49,6 +59,7 @@ jobs: - name: Trigger dispatch for helm-charts uses: peter-evans/repository-dispatch@v3 + if: env.TAG_VALID == 'true' with: token: ${{ secrets.OBOL_PLATFORM_PAT }} repository: ObolNetwork/helm-charts @@ -57,6 +68,7 @@ jobs: - name: Trigger dispatch for obol-ansible uses: peter-evans/repository-dispatch@v3 + if: env.TAG_VALID == 'true' with: token: ${{ secrets.OBOL_PLATFORM_PAT }} repository: ObolNetwork/obol-ansible @@ -65,6 +77,7 @@ jobs: - name: Trigger dispatch for CDVN uses: peter-evans/repository-dispatch@v3 + if: env.TAG_VALID == 'true' with: token: ${{ secrets.OBOL_PLATFORM_PAT }} repository: ObolNetwork/charon-distributed-validator-node @@ -73,6 +86,7 @@ jobs: - name: Trigger dispatch for CDVC uses: peter-evans/repository-dispatch@v3 + if: env.TAG_VALID == 'true' with: token: ${{ secrets.OBOL_PLATFORM_PAT }} repository: ObolNetwork/charon-distributed-validator-cluster