blob: 081eb24957ea1747028e283ce6010cff72ead60f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# Protected branches:
# * master: Synchronized between cgit and GitHub bidirectionally [experimental]
# * other branches: Only writable from cgit.
#
# Thus this check is mandatory for "other branches" to prevent us from merging them,
# because these branches are not synchronized from GitHub to cgit at all.
# Details: https://bugs.ruby-lang.org/issues/16094#note-10
name: check_branch
on: [pull_request]
jobs:
master:
runs-on: ubuntu-latest
steps:
- name: Check if branch is master
run: |
if [ "$BASE_REF" != master ]; then
echo "Only master branch accepts a pull request, but it's '$BASE_REF'."
exit 1
fi
env:
BASE_REF: ${{ github.base_ref }}
|