Skip to content

Commit

Permalink
TST: Update base branch logic
Browse files Browse the repository at this point in the history
[ci skip]
  • Loading branch information
pllim authored Feb 11, 2021
1 parent 254ddf4 commit 672828a
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci_workflows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check base branch
uses: pllim/action-check_pr_basebranch@main
uses: actions/github-script@v3
if: github.event_name == 'pull_request'
with:
BASEBRANCH_NAME: master
script: |
const allowed_basebranch = 'master';
const pr = context.payload.pull_request;
if (pr.base.ref !== allowed_basebranch) {
core.setFailed(`PR opened against ${pr.base.ref}, not ${allowed_basebranch}`);
} else {
core.info(`PR opened correctly against ${allowed_basebranch}`);
}
# TODO: Fix this for PRs
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@ce177499ccf9fd2aded3b0426c97e5434c2e8a73
Expand Down

0 comments on commit 672828a

Please sign in to comment.