Skip to content

Commit

Permalink
Merge pull request #35 from chingu-voyages/development
Browse files Browse the repository at this point in the history
Added github workflow file that prevents pushes and pull requests on main, unless they come from development
  • Loading branch information
aasmal97 authored Oct 7, 2023
2 parents 58704d9 + 548625c commit 452c198
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/development_merge_only.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 'Check Branch'
on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

jobs:
check_branch:
runs-on: ubuntu-latest
steps:
- name: Check branch
if: github.base_ref == 'main' && github.head_ref != 'development'
uses: actions/github-script@v3
with:
script: |
core.setFailed('You can only push to main from development branch')

0 comments on commit 452c198

Please sign in to comment.