Skip to content

Commit

Permalink
ci(all-nodejs-packages-publish): restrict job trigger pattern to semver
Browse files Browse the repository at this point in the history
Primary Changes
----------------
1. Added semver validation to all-nodejs-packages-publish.yaml

Fixes #2385

Signed-off-by: adrianbatuto <adrian.batuto@accenture.com>
  • Loading branch information
adrianbatuto committed Feb 26, 2025
1 parent ca70682 commit aa8aac7
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/all-nodejs-packages-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,18 @@ jobs:
permissions:
id-token: write
steps:
- name: Check Version Format in Tag
uses: nowsprinting/check-version-format-action@v3
id: version
with:
prefix: 'v'

- name: Fail if version is invalid
if: steps.version.outputs.is_valid != 'true'
run: |
echo "Error: Tag '${{ github.ref_name }}' is not a valid semantic version."
exit 1
- name: Print Workflow inputs.GIT_TAG_TO_PUBLISH
run: |
echo "inputs.GIT_TAG_TO_PUBLISH=${{ inputs.GIT_TAG_TO_PUBLISH }}"
Expand Down

0 comments on commit aa8aac7

Please sign in to comment.