Skip to content

Commit

Permalink
chore(uikit preview releae): validate preview branch name in workflow (
Browse files Browse the repository at this point in the history
  • Loading branch information
ddouglasz authored Dec 4, 2024
1 parent 6f1d62d commit 225bee9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/preview-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,14 @@ jobs:
# https://github.community/t/action-does-not-trigger-another-on-push-tag-action/17148/8
token: ${{ steps.generate_github_token.outputs.token }}

- name: Validate branch name
run: |
BRANCH_NAME=$(echo "${GITHUB_REF#refs/heads/}" | tr '/' '-')
if [[ ! "$BRANCH_NAME" =~ ^preview/[a-zA-Z0-9_-]+$ ]]; then
echo "Ignoring PR because of the branch name. Exiting workflow."
exit 1
fi
- name: Setup Node (uses version in .nvmrc)
uses: actions/setup-node@v4
with:
Expand Down

0 comments on commit 225bee9

Please sign in to comment.