From 74482638eefd86fec90216e15af66e865effbd82 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 15 Sep 2024 11:28:40 -0400 Subject: [PATCH] Do not run CI on draft PRs --- .github/workflows/check-pr-has-milestone.yml | 1 + .github/workflows/ci-security.yml | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/check-pr-has-milestone.yml b/.github/workflows/check-pr-has-milestone.yml index d2b5029d9a..86d5c1b473 100644 --- a/.github/workflows/check-pr-has-milestone.yml +++ b/.github/workflows/check-pr-has-milestone.yml @@ -13,6 +13,7 @@ concurrency: jobs: fail-on-bad-milestone: + if: github.event.pull_request.draft != true name: Fail if Pull Request has no Associated Version Milestone runs-on: ubuntu-latest steps: diff --git a/.github/workflows/ci-security.yml b/.github/workflows/ci-security.yml index a558d7c29b..e9b0aa55e4 100644 --- a/.github/workflows/ci-security.yml +++ b/.github/workflows/ci-security.yml @@ -22,7 +22,7 @@ concurrency: jobs: security-checkpoint: name: Check CI Clearance - if: github.event_name == 'pull_request_target' && (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id || github.event.pull_request.user.id == 49699333) && github.event.pull_request.state == 'open' + if: github.event_name == 'pull_request_target' && (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id || github.event.pull_request.user.id == 49699333) && github.event.pull_request.state == 'open' && github.event.pull_request.draft != true runs-on: ubuntu-latest steps: - name: Generate App Token @@ -74,7 +74,7 @@ jobs: ci-pipline-workflow-call: name: CI Pipeline needs: security-checkpoint - if: (!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (github.event_name != 'pull_request_target' && github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event.pull_request.user.id != 49699333))) + if: (!(cancelled() || failure()) && (needs.security-checkpoint.result == 'success' || (github.event_name != 'pull_request_target' && github.event.pull_request.head.repo.id == github.event.pull_request.base.repo.id && github.event.pull_request.user.id != 49699333)) && github.event.pull_request.draft != true) uses: ./.github/workflows/ci-pipeline.yml secrets: inherit with: