New submission #47
Workflow file for this run
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: Check base branch | |
on: | |
pull_request: | |
types: | |
- opened | |
- edited | |
jobs: | |
run_if: | |
runs-on: ubuntu-latest | |
name: Error if a fork with a base which is not develop | |
steps: | |
- uses: actions/checkout@v4 | |
- run: echo "You cannot create a pull request to ${{ github.base_ref }} from a fork" && exit 1 | |
if: github.event.pull_request.head.repo.full_name != github.repository && github.base_ref != 'develop' | |
- run: exit 0 | |
if: github.event.pull_request.head.repo.full_name == github.repository | |
env: | |
GH_TOKEN: ${{ github.token }} |