From a3a497287e7a34d75113a09435bc4a9155d624dc Mon Sep 17 00:00:00 2001 From: "raynato.c.pedrajeta" Date: Wed, 22 May 2024 15:26:08 +0800 Subject: [PATCH] perf(ci): only publish artifacts on git version tags of main Primary Changes ---------------- 1. Remove auto publishing of container images in all **publish.yaml upon push and maintain automation runs during pull requests Fixes #2360 Signed-off-by: raynato.c.pedrajeta --- .github/workflows/all-nodejs-packages-publish.yaml | 7 +++++-- .github/workflows/besu-all-in-one-publish.yaml | 9 +++++---- .github/workflows/cmd-api-server-publish.yaml | 9 +++++---- .github/workflows/connector-besu-publish.yaml | 9 +++++---- .github/workflows/connector-corda-server-publish.yaml | 10 +++++----- .../corda-4-6-all-in-one-obligation-publish.yaml | 9 +++++---- .../corda-4-7-all-in-one-obligation-publish.yaml | 9 +++++---- .../corda-4-8-all-in-one-obligation-publish.yaml | 9 +++++---- .github/workflows/dev-container-vscode-publish.yaml | 9 +++++---- .../workflows/example-carbon-accounting-publish.yaml | 9 +++++---- .../workflows/example-supply-chain-app-publish.yaml | 11 ++++++----- .github/workflows/fabric-all-in-one-publish.yaml | 9 +++++---- .github/workflows/fabric2-all-in-one-publish.yaml | 9 +++++---- .github/workflows/geth-all-in-one-publish.yaml | 9 +++++---- .../ghpkg-all-kotlin-api-clients-publish.yaml | 7 +++---- .github/workflows/iroha2-all-in-one-publish.yaml | 9 +++++---- .github/workflows/keychain-vault-server-publish.yaml | 9 +++++---- .github/workflows/quorum-all-in-one-publish.yaml | 9 +++++---- .../quorum-multi-party-all-in-one-publish.yaml | 9 +++++---- .github/workflows/sawtooth-all-in-one-publish.yaml | 9 +++++---- 20 files changed, 99 insertions(+), 80 deletions(-) diff --git a/.github/workflows/all-nodejs-packages-publish.yaml b/.github/workflows/all-nodejs-packages-publish.yaml index 1f73d7e8c32..fe043853ac4 100644 --- a/.github/workflows/all-nodejs-packages-publish.yaml +++ b/.github/workflows/all-nodejs-packages-publish.yaml @@ -4,9 +4,12 @@ env: NODEJS_VERSION: v18.18.2 on: - push: + pull_request: + branches: + - main + - dev - # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/besu-all-in-one-publish.yaml b/.github/workflows/besu-all-in-one-publish.yaml index e419010d3ef..2964f549724 100644 --- a/.github/workflows/besu-all-in-one-publish.yaml +++ b/.github/workflows/besu-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: besu-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev + # Publish `v1.2.3` tags as releases. - # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/cmd-api-server-publish.yaml b/.github/workflows/cmd-api-server-publish.yaml index 1f6eacd4ecc..efa8b0f99ed 100644 --- a/.github/workflows/cmd-api-server-publish.yaml +++ b/.github/workflows/cmd-api-server-publish.yaml @@ -1,12 +1,13 @@ name: cmd-api-server-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev + # Publish `v1.2.3` tags as releases. - # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/connector-besu-publish.yaml b/.github/workflows/connector-besu-publish.yaml index 83681456a36..a1e1c8f52d3 100644 --- a/.github/workflows/connector-besu-publish.yaml +++ b/.github/workflows/connector-besu-publish.yaml @@ -1,12 +1,13 @@ name: connector-fabric-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev + # Publish `v1.2.3` tags as releases. - # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/connector-corda-server-publish.yaml b/.github/workflows/connector-corda-server-publish.yaml index 721bb3b39de..c79c5f165ee 100644 --- a/.github/workflows/connector-corda-server-publish.yaml +++ b/.github/workflows/connector-corda-server-publish.yaml @@ -1,12 +1,12 @@ name: connector-corda-server-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main - - # Publish `v1.2.3` tags as releases. + - dev + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml index 70354a19b62..5be0f1590d6 100644 --- a/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml +++ b/.github/workflows/corda-4-6-all-in-one-obligation-publish.yaml @@ -1,12 +1,13 @@ name: corda-4-6-all-in-one-obligation-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev + # Publish `v1.2.3` tags as releases. - # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml index 0ec2ed25105..231bb04f86c 100644 --- a/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml +++ b/.github/workflows/corda-4-7-all-in-one-obligation-publish.yaml @@ -1,12 +1,13 @@ name: corda-4-7-all-in-one-obligation-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml b/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml index 7a9b6096efc..c86a466ffc8 100644 --- a/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml +++ b/.github/workflows/corda-4-8-all-in-one-obligation-publish.yaml @@ -1,12 +1,13 @@ name: corda-4-8-all-in-one-obligation-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/dev-container-vscode-publish.yaml b/.github/workflows/dev-container-vscode-publish.yaml index 554cc12aeec..7bc877e0fd2 100644 --- a/.github/workflows/dev-container-vscode-publish.yaml +++ b/.github/workflows/dev-container-vscode-publish.yaml @@ -1,12 +1,13 @@ name: dev-container-vscode-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/example-carbon-accounting-publish.yaml b/.github/workflows/example-carbon-accounting-publish.yaml index 360f25de659..debcc9fa185 100644 --- a/.github/workflows/example-carbon-accounting-publish.yaml +++ b/.github/workflows/example-carbon-accounting-publish.yaml @@ -1,12 +1,13 @@ name: example-carbon-accounting-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/example-supply-chain-app-publish.yaml b/.github/workflows/example-supply-chain-app-publish.yaml index 19a3457642c..ca898eeb2b4 100644 --- a/.github/workflows/example-supply-chain-app-publish.yaml +++ b/.github/workflows/example-supply-chain-app-publish.yaml @@ -1,12 +1,13 @@ name: example-supply-chain-app-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main - - # Publish `v1.2.3` tags as releases. + - dev + + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/fabric-all-in-one-publish.yaml b/.github/workflows/fabric-all-in-one-publish.yaml index f0a2108a1c4..d41da422d8b 100644 --- a/.github/workflows/fabric-all-in-one-publish.yaml +++ b/.github/workflows/fabric-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: fabric-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/fabric2-all-in-one-publish.yaml b/.github/workflows/fabric2-all-in-one-publish.yaml index 85abde550e6..9826d379698 100644 --- a/.github/workflows/fabric2-all-in-one-publish.yaml +++ b/.github/workflows/fabric2-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: fabric2-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/geth-all-in-one-publish.yaml b/.github/workflows/geth-all-in-one-publish.yaml index 4c9b2705dbe..45f26b99286 100644 --- a/.github/workflows/geth-all-in-one-publish.yaml +++ b/.github/workflows/geth-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: geth-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml index af49b8f8bfc..b3b2276fea4 100644 --- a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml +++ b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml @@ -4,11 +4,10 @@ env: NODEJS_VERSION: v18.18.2 on: - push: - branches: [main, dev] - pull_request: - branches: [main, dev] + branches: + - main + - dev concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} diff --git a/.github/workflows/iroha2-all-in-one-publish.yaml b/.github/workflows/iroha2-all-in-one-publish.yaml index 47f07c50fc2..5c085dbe186 100644 --- a/.github/workflows/iroha2-all-in-one-publish.yaml +++ b/.github/workflows/iroha2-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: iroha2-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/keychain-vault-server-publish.yaml b/.github/workflows/keychain-vault-server-publish.yaml index 2bacf8aa3eb..0904819671c 100644 --- a/.github/workflows/keychain-vault-server-publish.yaml +++ b/.github/workflows/keychain-vault-server-publish.yaml @@ -1,12 +1,13 @@ name: keychain-vault-server-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/quorum-all-in-one-publish.yaml b/.github/workflows/quorum-all-in-one-publish.yaml index b119b11127a..55fac162607 100644 --- a/.github/workflows/quorum-all-in-one-publish.yaml +++ b/.github/workflows/quorum-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: quorum-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/quorum-multi-party-all-in-one-publish.yaml b/.github/workflows/quorum-multi-party-all-in-one-publish.yaml index cbea32b5f7f..590e14db814 100644 --- a/.github/workflows/quorum-multi-party-all-in-one-publish.yaml +++ b/.github/workflows/quorum-multi-party-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: quorum-multi-party-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v* diff --git a/.github/workflows/sawtooth-all-in-one-publish.yaml b/.github/workflows/sawtooth-all-in-one-publish.yaml index 4148c69d3b7..686e0c44843 100644 --- a/.github/workflows/sawtooth-all-in-one-publish.yaml +++ b/.github/workflows/sawtooth-all-in-one-publish.yaml @@ -1,12 +1,13 @@ name: sawtooth-all-in-one-publish on: - push: - # Publish `main` as Docker `latest` image. - branches: + pull_request: + branches: - main + - dev - # Publish `v1.2.3` tags as releases. + # Publish `v1.2.3` tags as releases. + push: tags: - v*