Development #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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 |