1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/.github/workflows/check_branch.yml
Takashi Kokubun 331655cbe7
Migrate Wercker MJIT tests to Actions (#2676)
* Migrate Wercker MJIT tests to Actions

* Support pull request for testing

* Capitalize other jobs too

* Make it a command name for consistency [ci skip]

* Remove wercker.yml

* Add --jit-verbose=2 for debugging

* Install MJIT headers

* Separate install for sudo

* Trigger build
2019-11-12 21:48:05 -08:00

22 lines
767 B
YAML

# We bidirectionally synchronize github.com/ruby/ruby.git's master branch and
# git.ruby-lang.org/ruby.git's master branch.
# We can use a pull request's merge button only on the master branch.
#
# Therefore, we require to pass this "check_branch" on all protected branches
# to prevent us from accidentally pushing commits to GitHub directly.
#
# Details: https://bugs.ruby-lang.org/issues/16094
name: Pull Request
on: [pull_request]
jobs:
check_branch:
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 }}