Skip to content

Commit

Permalink
Feature/SK-288 [studio-models] | Add branch-name-checks (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
Wrede authored Nov 30, 2022
1 parent 6d58ccb commit d3a00cc
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/branch-name-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: "branch name check"

on:
push:
branches-ignore:
- develop
- main

env:
BRANCH_REGEX: '^((feature|hotfix|bug|docs)\/.+)|(release\/v((([0-9]+)\.([0-9]+)\.([0-9]+)(?:-([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?)(?:\+([0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?))$'

jobs:
branch-name-check:
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2

- name: branch name check
run: |
git rev-parse --abbrev-ref HEAD | grep -P "$BRANCH_REGEX"

0 comments on commit d3a00cc

Please sign in to comment.