Skip to content

Commit

Permalink
*: add condition to trigger dispatch only for specific tags
Browse files Browse the repository at this point in the history
  • Loading branch information
apham0001 committed Dec 12, 2024
1 parent 1250a87 commit 118ed6f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 118ed6f

Please sign in to comment.