mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Add a quick job to be used for branch protection
This commit is contained in:
parent
8d302c914c
commit
edd2538268
1 changed files with 15 additions and 0 deletions
15
.github/workflows/check_branch.yml
vendored
Normal file
15
.github/workflows/check_branch.yml
vendored
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# This will be used to achieve [Misc #16094] later.
|
||||||
|
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 }}
|
Loading…
Reference in a new issue