Skip to content

Create pr-check.yml

Create pr-check.yml #8

Workflow file for this run

name: check-pr-destination-branch
on: [pull_request]
env:
PROTECTED_BRANCH_NAME: main
jobs:
check-pr-destination-branch:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- run: env
- uses: actions/github-script@v7.0.1
if: ${{ github.base_ref }} != ${{ env.PROTECTED_BRANCH_NAME }}
with:
script: |
core.setFailed('PRs must target either main-staging or a feature branch')