This file contains 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: No PRs to live branch | |
on: | |
pull_request_target: | |
types: | |
- opened | |
branches: | |
- master | |
jobs: | |
prevent-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Comment and close PR | |
run: | | |
gh pr close "${PR_URL}" | |
--comment "Pull requests to the master branch are not allowed. Use staging branch. Maintainer can publish staging branch using workflow dispatch at https://github.com/laminas/getlaminas.org/actions/workflows/publish.yml" | |
env: | |
PR_URL: ${{ github.event.pull_request.url }} | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |