Skip to content

Commit

Permalink
Fix action
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Feb 22, 2025
1 parent 419394a commit 128a5cc
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/enforce-branch-policy.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
name: Run Tests
name: Enforce Branch Policy

on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
enforce-branch-policy:
runs-on: ubuntu-latest
steps:
- name: Enforce branch policy
- name: Enforce main branch policy
if: github.ref == 'refs/heads/main'
run: |
echo "Pull requests to the main branch are not allowed."
exit 1
exit 1
- name: Enforce develop branch policy
if: github.ref != 'refs/heads/main'
run: |
echo "Pull requests to the develop branch are allowed."
exit 0

0 comments on commit 128a5cc

Please sign in to comment.