Skip to content

Commit

Permalink
[#3] Skip CI if PR is a draft
Browse files Browse the repository at this point in the history
  • Loading branch information
elBoberido committed Dec 3, 2024
1 parent 9463c6d commit 902ffb1
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,20 @@ on:
# RUSTFLAGS: "-C debug-assertions"

jobs:
check_draft_pr:
runs-on: ubuntu-latest
steps:
- name: Check if PR is a draft
run: |
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_draft_pr
runs-on: ubuntu-latest
permissions:
pull-requests: read
Expand Down

0 comments on commit 902ffb1

Please sign in to comment.