From 5a22f2cf0b352517c93bc97387c356e55b5663c3 Mon Sep 17 00:00:00 2001 From: Krishnan Parthasarathi Date: Mon, 29 Nov 2021 23:35:07 -0800 Subject: [PATCH] disable CI/CD for draft PRs (#13784) --- .github/workflows/go-cross.yml | 5 ++++- .github/workflows/go-lint.yml | 5 ++++- .github/workflows/go.yml | 5 ++++- .github/workflows/iam-integrations.yaml | 5 ++++- .github/workflows/replication.yaml | 5 ++++- .github/workflows/upgrade-ci-cd.yaml | 4 +++- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/.github/workflows/go-cross.yml b/.github/workflows/go-cross.yml index d89001a93..1d83654ac 100644 --- a/.github/workflows/go-cross.yml +++ b/.github/workflows/go-cross.yml @@ -3,7 +3,9 @@ name: Crosscompile on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] + # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +15,7 @@ concurrency: jobs: build: + if: github.event.pull_request.draft == false name: Build Tests with Go ${{ matrix.go-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/go-lint.yml b/.github/workflows/go-lint.yml index e5dbf9c87..890d9369e 100644 --- a/.github/workflows/go-lint.yml +++ b/.github/workflows/go-lint.yml @@ -3,7 +3,9 @@ name: Linters and Tests on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] + # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +15,7 @@ concurrency: jobs: build: + if: github.event.pull_request.draft == false name: Go ${{ matrix.go-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 1104cbbbd..9919b71f9 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -3,7 +3,9 @@ name: Functional Tests on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] + # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +15,7 @@ concurrency: jobs: build: + if: github.event.pull_request.draft == false name: Go ${{ matrix.go-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: diff --git a/.github/workflows/iam-integrations.yaml b/.github/workflows/iam-integrations.yaml index 1c1f7b74d..e5588e6c8 100644 --- a/.github/workflows/iam-integrations.yaml +++ b/.github/workflows/iam-integrations.yaml @@ -3,7 +3,9 @@ name: IAM integration on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] + # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +15,7 @@ concurrency: jobs: iam-matrix-test: + if: github.event.pull_request.draft == false name: "[Go=${{ matrix.go-version }}|ldap=${{ matrix.ldap }}|etcd=${{ matrix.etcd }}|openid=${{ matrix.openid }}]" runs-on: ubuntu-latest diff --git a/.github/workflows/replication.yaml b/.github/workflows/replication.yaml index 808773325..b34202067 100644 --- a/.github/workflows/replication.yaml +++ b/.github/workflows/replication.yaml @@ -3,7 +3,9 @@ name: Multi-site replication tests on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] + # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +15,7 @@ concurrency: jobs: replication-test: + if: github.event.pull_request.draft == false name: Replication Tests with Go ${{ matrix.go-version }} runs-on: ubuntu-latest diff --git a/.github/workflows/upgrade-ci-cd.yaml b/.github/workflows/upgrade-ci-cd.yaml index 9603d713e..92bcc5931 100644 --- a/.github/workflows/upgrade-ci-cd.yaml +++ b/.github/workflows/upgrade-ci-cd.yaml @@ -3,7 +3,8 @@ name: Upgrade old version tests on: pull_request: branches: - - master + - master + types: [opened, synchronize, reopened, ready_for_review] # This ensures that previous jobs for the PR are canceled when the PR is # updated. @@ -13,6 +14,7 @@ concurrency: jobs: build: + if: github.event.pull_request.draft == false name: Go ${{ matrix.go-version }} on ${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: