diff --git a/.github/workflows/build-test.yml b/.github/workflows/build-test.yml index 807dd89cf..b4fcedabd 100644 --- a/.github/workflows/build-test.yml +++ b/.github/workflows/build-test.yml @@ -10,20 +10,20 @@ env: PR_TITLE: ${{ github.event.pull_request.title }} # NOTE: this is used to prevent script injection attacks when used directly in "run" jobs: - check_wip_pr: + check_draft_pr: runs-on: ubuntu-latest steps: - - name : Print Title of PR - run: echo The Title of your PR is "env.PR_TITLE" - - - name: Check for WIP Marker - if: startsWith(env.PR_TITLE, '[WIP]') + - name: Check if PR is a draft run: | - echo "PR is work in progress -> Aborting CI" - exit 1 + if [ "${{ github.event.pull_request.draft }}" == "true" ]; then + echo "PR is a draft. CI will not proceed." + exit 1 # Abort the CI job + else + echo "PR is not a draft. Proceeding with CI." + fi changes: - needs: check_wip_pr + needs: check_draft_pr runs-on: ubuntu-latest permissions: pull-requests: read