From c7d166e23d0ed747f96e08f9bf40ac9eabe86e78 Mon Sep 17 00:00:00 2001 From: Mathias Kraus Date: Tue, 3 Dec 2024 14:24:04 +0100 Subject: [PATCH] test --- .github/workflows/build-test.yml | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) 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