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: Enforce PRs Only from Staging | |
| # on: | |
| # pull_request: | |
| # branches: [main] | |
| # types: [opened, synchronize, reopened] | |
| # jobs: | |
| # check-branch: | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Fail if source is not staging | |
| # run: | | |
| # echo "Source branch: ${{ github.head_ref }}" | |
| # if [[ "${{ github.head_ref }}" != "staging" ]]; then | |
| # echo "❌ Only PRs from 'staging' are allowed to merge into 'main'." | |
| # exit 1 | |
| # else | |
| # echo "✅ PR is from staging branch. Proceeding." | |
| # fi |