From 8d663a467acf5a5af8ed613caaddba49955d71dc Mon Sep 17 00:00:00 2001 From: Jubilee Young Date: Wed, 2 Sep 2020 21:08:44 -0700 Subject: [PATCH] Skip CI when drafts are opened There is no particular reason to run CI against an unfinished PR, since it is likely the author already knows it will fail. When the PR is no longer a draft later commits will cause CI to rerun, and bors exists, so this should be no problem for workflows. --- .github/workflows/ci.yml | 2 +- src/ci/github-actions/ci.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6c6c816eec622..1c601066bcb1f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -36,7 +36,7 @@ jobs: SCCACHE_BUCKET: rust-lang-ci-sccache2 TOOLSTATE_REPO: "https://github.com/rust-lang-nursery/rust-toolstate" CACHE_DOMAIN: ci-caches.rust-lang.org - if: "github.event_name == 'pull_request'" + if: "github.event_name == 'pull_request' && github.event.pull_request.draft == false" strategy: matrix: include: diff --git a/src/ci/github-actions/ci.yml b/src/ci/github-actions/ci.yml index 522d5bd3d9c36..763b5b959a2c3 100644 --- a/src/ci/github-actions/ci.yml +++ b/src/ci/github-actions/ci.yml @@ -271,7 +271,7 @@ jobs: name: PR env: <<: [*shared-ci-variables, *public-variables] - if: github.event_name == 'pull_request' + if: github.event_name == 'pull_request' && github.event.pull_request.draft == false strategy: matrix: include: