From eba71a62ba93fccec88e21357fcd63fdef22eab8 Mon Sep 17 00:00:00 2001 From: Anmol1696 Date: Wed, 11 Oct 2023 10:30:39 +0530 Subject: [PATCH] add conditions to not run PRs on draft PRs --- .github/workflows/build.yaml | 4 ++++ .github/workflows/docker.yaml | 3 +++ .github/workflows/docs.yaml | 2 ++ .github/workflows/lint-check.yaml | 6 ++++-- .github/workflows/pr-tests.yaml | 2 ++ 5 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 8ee2add8..aee44e8f 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -7,6 +7,7 @@ on: pull_request: branches: - main + types: [opened, reopened, synchronize, ready_for_review] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-build @@ -14,6 +15,7 @@ concurrency: jobs: build-exposer: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: @@ -30,6 +32,7 @@ jobs: cd exposer && make build build-registry: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: @@ -46,6 +49,7 @@ jobs: cd registry && make build build-faucet: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 15787c68..622d5261 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -13,6 +13,7 @@ on: paths: - "docker/**" - ".github/workflows/docker.yaml" + types: [opened, reopened, synchronize, ready_for_review] workflow_dispatch: concurrency: @@ -21,6 +22,7 @@ concurrency: jobs: build-push-types: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest permissions: @@ -68,6 +70,7 @@ jobs: ./scripts/build-docker.sh --type ${{ matrix.build-type }} --process all --version all --push --force build-push-chains: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest permissions: diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index 6439b2a7..0af551ee 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -13,9 +13,11 @@ on: paths: - "docs/**" - ".github/workflows/docs.yaml" + types: [opened, reopened, synchronize, ready_for_review] jobs: deploy: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: diff --git a/.github/workflows/lint-check.yaml b/.github/workflows/lint-check.yaml index e7abfded..bc0fe99a 100644 --- a/.github/workflows/lint-check.yaml +++ b/.github/workflows/lint-check.yaml @@ -1,12 +1,13 @@ name: Lint and Test Charts on: - pull_request: + push: branches: - main - push: + pull_request: branches: - main + types: [ opened, reopened, synchronize, ready_for_review ] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-lint @@ -14,6 +15,7 @@ concurrency: jobs: lint-test: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest steps: - name: Checkout diff --git a/.github/workflows/pr-tests.yaml b/.github/workflows/pr-tests.yaml index 87089915..6087d5b1 100644 --- a/.github/workflows/pr-tests.yaml +++ b/.github/workflows/pr-tests.yaml @@ -4,6 +4,7 @@ on: pull_request: branches: - main + types: [opened, reopened, synchronize, ready_for_review] concurrency: group: ${{ github.workflow }}-${{ github.ref }}-pr-tests @@ -11,6 +12,7 @@ concurrency: jobs: pr-test: + if: github.event_name != 'pull_request' || !github.event.pull_request.draft runs-on: ubuntu-latest timeout-minutes: 30