Skip to content

Commit

Permalink
Moved to bash
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 8, 2024
1 parent b475244 commit b37d736
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ on:
push:
branches:
- '**'

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

jobs:
check-branch-name:
if: |
${{ ! contains(github.ref_name, 'feature/') || ! contains(github.ref_name, 'development')
|| ! contains(github.ref_name, 'master') || ! contains(github.ref_name, 'bugfix/')
||! contains(github.ref_name, 'hotfix/') || ! contains(github.ref_name, 'release/') }}
runs-on: ubuntu-latest
steps:
- name: Fail
run: exit 1
- 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 b37d736

Please sign in to comment.