File: pull_request_check.yml

package info (click to toggle)
fastrpc 1.0.2-2
  • links: PTS, VCS
  • area: contrib
  • in suites: forky, sid
  • size: 2,816 kB
  • sloc: ansic: 30,070; makefile: 230; sh: 31
file content (23 lines) | stat: -rw-r--r-- 679 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
name: Prevent pull request to main
on:
  pull_request_target:
    types:
      - opened
      - reopened
      - synchronize
      - edited

jobs:
  check-branches:
    runs-on: ubuntu-latest
    steps:
      - name: Check branches
        env:
          GITHUB_HEAD_REF: ${{ github.head_ref }}
          GITHUB_BASE_REF: ${{ github.base_ref }}
        run: |
          if [ "$GITHUB_HEAD_REF" != "development" ] && [ "$GITHUB_BASE_REF" == "main" ]; then
            echo "Create a pull request to quic/fastrpc:development branch"
            echo "Pull requests to quic/fastrpc:main branch are only allowed from quic/fastrpc:development branch."
            exit 1
          fi