summaryrefslogtreecommitdiff
path: root/.github/workflows/check_branch.yml
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2019-08-12 23:36:42 +0900
committerTakashi Kokubun <takashikkbn@gmail.com>2019-08-12 23:44:34 +0900
commitedd25382687c840f10eec23d72fa08ebd3515fbf (patch)
tree834e6704b3097b29beb1af66632b9dc656823c65 /.github/workflows/check_branch.yml
parent8d302c914c15af4a29c8b8af801281fa117a7ad2 (diff)
Add a quick job to be used for branch protection
Diffstat (limited to '.github/workflows/check_branch.yml')
-rw-r--r--.github/workflows/check_branch.yml15
1 files changed, 15 insertions, 0 deletions
diff --git a/.github/workflows/check_branch.yml b/.github/workflows/check_branch.yml
new file mode 100644
index 0000000000..797e78ef07
--- /dev/null
+++ b/.github/workflows/check_branch.yml
@@ -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 }}