diff --git a/.github/workflows/ci_workflows.yml b/.github/workflows/ci_workflows.yml index 08dbb634..71389ffc 100644 --- a/.github/workflows/ci_workflows.yml +++ b/.github/workflows/ci_workflows.yml @@ -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