Skip to content

Commit 8981a5a

Browse files
authored
*: add condition to trigger dispatch only for specific tags (#3411)
add condition to trigger dispatch only for specific tags category: feature ticket: none
1 parent 81005ac commit 8981a5a

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,17 @@ jobs:
3939
- name: Extract tag name
4040
run: echo "TAG_NAME=${GITHUB_REF##*/}" >> $GITHUB_ENV
4141

42+
- name: Validate tag pattern
43+
id: validate_tag
44+
run: |
45+
if [[ "${TAG_NAME}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
46+
echo "TAG_VALID=true" >> $GITHUB_ENV
47+
else
48+
echo "TAG_VALID=false" >> $GITHUB_ENV
49+
fi
50+
4251
- name: Trigger dispatch for obol-docs
52+
if: env.TAG_VALID == 'true'
4353
uses: peter-evans/repository-dispatch@v3
4454
with:
4555
token: ${{ secrets.OBOL_PLATFORM_PAT }}
@@ -49,6 +59,7 @@ jobs:
4959

5060
- name: Trigger dispatch for helm-charts
5161
uses: peter-evans/repository-dispatch@v3
62+
if: env.TAG_VALID == 'true'
5263
with:
5364
token: ${{ secrets.OBOL_PLATFORM_PAT }}
5465
repository: ObolNetwork/helm-charts
@@ -57,6 +68,7 @@ jobs:
5768

5869
- name: Trigger dispatch for obol-ansible
5970
uses: peter-evans/repository-dispatch@v3
71+
if: env.TAG_VALID == 'true'
6072
with:
6173
token: ${{ secrets.OBOL_PLATFORM_PAT }}
6274
repository: ObolNetwork/obol-ansible
@@ -65,6 +77,7 @@ jobs:
6577

6678
- name: Trigger dispatch for CDVN
6779
uses: peter-evans/repository-dispatch@v3
80+
if: env.TAG_VALID == 'true'
6881
with:
6982
token: ${{ secrets.OBOL_PLATFORM_PAT }}
7083
repository: ObolNetwork/charon-distributed-validator-node
@@ -73,6 +86,7 @@ jobs:
7386

7487
- name: Trigger dispatch for CDVC
7588
uses: peter-evans/repository-dispatch@v3
89+
if: env.TAG_VALID == 'true'
7690
with:
7791
token: ${{ secrets.OBOL_PLATFORM_PAT }}
7892
repository: ObolNetwork/charon-distributed-validator-cluster

0 commit comments

Comments
 (0)