Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Dec 3, 2024
1 parent 93d5e9d commit 70e437e
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,24 @@ on:
pull_request:
branches: [ main, release* ]

env:
PR_TITLE: ${{ github.event.pull_request.title }} # NOTE: this is used to prevent script injection attacks when used directly in "run"
# env:
# RUSTFLAGS: "-C debug-assertions"

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
Expand Down

0 comments on commit 70e437e

Please sign in to comment.