From 76ebb0b504aa72c8ecf4e206d4288593cab6de68 Mon Sep 17 00:00:00 2001 From: JP-Ellis Date: Thu, 12 Dec 2024 11:02:04 +1100 Subject: [PATCH] chore(ci): reduce ci usage Specifically avoid duplicating the number of CI runs by being more specific about when to run CI on PRs and pushes Signed-off-by: JP-Ellis --- .github/workflows/examples.yml | 8 ++++++-- .github/workflows/gradle.yml | 8 ++++++-- .github/workflows/plugin-cli.yml | 8 +++++++- .github/workflows/release.yml | 13 ++++++------- .github/workflows/rust.yml | 11 ++++++++++- 5 files changed, 35 insertions(+), 13 deletions(-) diff --git a/.github/workflows/examples.yml b/.github/workflows/examples.yml index 4246186..e0d4cbf 100644 --- a/.github/workflows/examples.yml +++ b/.github/workflows/examples.yml @@ -1,8 +1,12 @@ name: Pact Plugin Examples on: - - push - - pull_request + push: + branches: + - main + pull_request: + branches: + - main jobs: csv-examples: diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml index aef7afe..baad3ce 100644 --- a/.github/workflows/gradle.yml +++ b/.github/workflows/gradle.yml @@ -1,8 +1,12 @@ name: Pact Plugin Driver (Gradle) on: - - push - - pull_request + push: + branches: + - main + pull_request: + branches: + - main jobs: latest_jdk: diff --git a/.github/workflows/plugin-cli.yml b/.github/workflows/plugin-cli.yml index 2f1a42f..9f9f4f8 100644 --- a/.github/workflows/plugin-cli.yml +++ b/.github/workflows/plugin-cli.yml @@ -1,6 +1,12 @@ name: Pact Plugin CLI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + branches: + - main jobs: build: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6076dde..7c3593b 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,15 +2,14 @@ name: Release workflow on: release: - types: [published] - + types: + - published + push: + branches: + - main pull_request: branches: - main - -concurrency: - group: release-${{ github.ref }} - cancel-in-progress: true jobs: build-release: @@ -61,7 +60,7 @@ jobs: echo "flags=--release" >> "$GITHUB_OUTPUT" else echo "flags=" >> "$GITHUB_OUTPUT" - fi + fi - if: | github.event_name == 'push' || github.event_name == 'pull_request' || diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index da45b90..2ee5587 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -1,6 +1,15 @@ name: Pact Plugin Driver (Rust) -on: [push, pull_request] +on: + release: + types: + - published + push: + branches: + - main + pull_request: + branches: + - main jobs: build: