Skip to content

Commit

Permalink
Feature/31 reject branch in ci if not adhering to naming schema (#32)
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 11, 2024
1 parent d70afcc commit 11460c4
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Branch

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'

env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}

jobs:
check-branch-name:
runs-on: ubuntu-latest
steps:
- name: Check for branch name
run:
if [[ $BRANCH_NAME =~ (feature|bugfix|hotfix|development|release|master)\/* ]]; then exit 0; else exit 1; fi

0 comments on commit 11460c4

Please sign in to comment.