Skip to content

Commit

Permalink
Merge pull request #550 from ewels/actions-check-branch
Browse files Browse the repository at this point in the history
Add PR branch check to tools repo
drpatelh authored Feb 20, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents c8dd170 + 5192b6d commit adb2261
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: nf-core branch protection
# This workflow is triggered on PRs to master branch on the repository
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
on:
pull_request:
branches:
- master

jobs:
test:
runs-on: ubuntu-18.04
steps:
# PRs are only ok if coming from an nf-core `dev` branch or a fork `patch` branch
- name: Check PRs
run: |
{ [[ $(git remote get-url origin) == *nf-core/tools ]] && [[ ${GITHUB_HEAD_REF} = "dev" ]]; } || [[ ${GITHUB_HEAD_REF} == "patch" ]]

0 comments on commit adb2261

Please sign in to comment.