Prevent actions from running on draft PRs (#2457)

Draft PRs are triggering actions on every commit (except
`test-invoke-pip.yml`).

I've added a conditional to each job to only run when the PR is not a
draft.

(maybe there is a reason we are running all applicable workflows on
draft PRs?)
This commit is contained in:
Lincoln Stein 2023-02-01 00:33:15 -05:00 committed by GitHub
commit 5f16148dea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ env:
jobs:
docker:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:

View File

@ -8,6 +8,7 @@ on:
jobs:
docker:
if: github.event.pull_request.draft == false
strategy:
fail-fast: false
matrix:

View File

@ -14,6 +14,7 @@ defaults:
jobs:
lint-frontend:
if: github.event.pull_request.draft == false
runs-on: ubuntu-22.04
steps:
- name: Setup Node 18

View File

@ -7,6 +7,7 @@ on:
jobs:
mkdocs-material:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- name: checkout sources

View File

@ -9,6 +9,7 @@ on:
jobs:
pyflakes:
name: runner / pyflakes
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2