From d57561320dfff6b544da88d7da9372bc58e89531 Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Wed, 1 Feb 2023 14:42:54 -0300 Subject: [PATCH] ci: don't run jobs on draft PR --- .github/workflows/pull-request.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pull-request.yaml b/.github/workflows/pull-request.yaml index b69ba060..dff7cc14 100644 --- a/.github/workflows/pull-request.yaml +++ b/.github/workflows/pull-request.yaml @@ -5,10 +5,20 @@ on: branches: - '!master' pull_request: + types: [opened, synchronize, reopened, ready_for_review] jobs: lint: + if: 'github.event.pull_request.draft == false' uses: ./.github/workflows/lint.yaml bundlesize: + if: 'github.event.pull_request.draft == false' uses: ./.github/workflows/bundlesize.yaml + + fail_if_pull_request_is_draft: + if: github.event.pull_request.draft == true + runs-on: ubuntu-18.04 + steps: + - name: Fails in order to indicate that pull request needs to be marked as ready to review and unit tests workflow needs to pass. + run: exit 1