Skip to content

Development

Development #19

Workflow file for this run

name: Restrict PRs
on:
pull_request:
branches:
- staging
- production
jobs:
restrict-pr-to-staging:
if: github.base_ref == 'staging'
runs-on: ubuntu-latest
steps:
- name: Check PR Source Branch for Staging
if: github.head_ref != 'development'
run: |
echo "PRs to staging can only come from development branch."
exit 1
restrict-pr-to-production:
if: github.base_ref == 'production'
runs-on: ubuntu-latest
steps:
- name: Check PR Source Branch for Production
if: github.head_ref != 'staging'
run: |
echo "PRs to production can only come from staging branch."
exit 1