From 56527a003fb98e9341bb96cdc14800c832a1aefc Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Wed, 8 Nov 2023 11:50:40 +0100 Subject: [PATCH] Move concurrency block after the vars --- .github/workflows/bump-version-release.yaml | 8 ++++---- .github/workflows/docker-build-and-publish.yaml | 8 +++++--- .github/workflows/helm-gke-deploy.yaml | 9 +++++---- .github/workflows/helm-gke-destroy.yaml | 9 +++++---- .github/workflows/helm-multi-release.yaml | 8 ++++---- .github/workflows/helm-release.yaml | 8 ++++---- .github/workflows/java-gradle-base.yaml | 8 +++++--- .github/workflows/java-gradle-docker.yaml | 9 +++++---- .github/workflows/java-gradle-library.yaml | 8 +++++--- .github/workflows/java-gradle-plugin.yaml | 8 +++++--- .github/workflows/java-gradle-release.yaml | 9 +++++---- .github/workflows/kustomize-gke-deploy.yaml | 9 +++++---- .github/workflows/kustomize-gke-destroy.yaml | 9 +++++---- .github/workflows/python-poetry-publish-pypi.yaml | 9 +++++---- .github/workflows/python-poetry-publish-snapshot.yaml | 9 +++++---- .github/workflows/python-poetry-release.yaml | 9 +++++---- .github/workflows/release-tag-versions.yaml | 9 +++++---- .github/workflows/test-python-setup-poetry.yaml | 8 ++++---- 18 files changed, 86 insertions(+), 68 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index 5d5b14eb7..1246f2eb3 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -1,10 +1,6 @@ name: Bump Version Release # Reusable workflow for creating release tags using bumpversion -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release - cancel-in-progress: true - on: workflow_call: inputs: @@ -48,6 +44,10 @@ on: description: "The old version in your `.bumpversion.cfg` file." value: ${{ jobs.release.outputs.old-version }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release + cancel-in-progress: true + jobs: release: runs-on: ubuntu-22.04 diff --git a/.github/workflows/docker-build-and-publish.yaml b/.github/workflows/docker-build-and-publish.yaml index 2b8b55d4e..c49edb1f8 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -1,9 +1,6 @@ name: Docker build and publish # Reusable workflow to build and push an image from a Dockerfile to any container registry -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker - cancel-in-progress: true on: workflow_call: inputs: @@ -57,6 +54,7 @@ on: required: false default: "." type: string + secrets: docker-user: description: "Username for the Docker registry login." @@ -70,6 +68,10 @@ on: description: "GitHub token." required: false +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker + cancel-in-progress: true + jobs: docker-build: name: Docker build diff --git a/.github/workflows/helm-gke-deploy.yaml b/.github/workflows/helm-gke-deploy.yaml index ac923b927..61023c6a0 100644 --- a/.github/workflows/helm-gke-deploy.yaml +++ b/.github/workflows/helm-gke-deploy.yaml @@ -1,10 +1,6 @@ name: Helm GKE Deploy # Reusable workflow for deploying a Helm chart on GKE Kubernetes -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy - cancel-in-progress: true - on: workflow_call: inputs: @@ -60,6 +56,7 @@ on: default: "v3.8.1" required: false type: string + secrets: gke-service-account: description: "GKE service account key for authentication" @@ -74,6 +71,10 @@ on: description: "GKE cluster for authentication" required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy + cancel-in-progress: true + jobs: deploy: name: Deploy diff --git a/.github/workflows/helm-gke-destroy.yaml b/.github/workflows/helm-gke-destroy.yaml index d97bf25b5..5aab2803f 100644 --- a/.github/workflows/helm-gke-destroy.yaml +++ b/.github/workflows/helm-gke-destroy.yaml @@ -1,10 +1,6 @@ name: Helm GKE Destroy # Reusable workflow for destroying a Helm chart on GKE Kubernetes -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy - cancel-in-progress: true - on: workflow_call: inputs: @@ -31,6 +27,7 @@ on: default: "v3.8.1" required: false type: string + secrets: gke-service-account: description: "GKE service account key for authentication" @@ -45,6 +42,10 @@ on: description: "GKE cluster for authentication" required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy + cancel-in-progress: true + jobs: destroy: name: Destroy diff --git a/.github/workflows/helm-multi-release.yaml b/.github/workflows/helm-multi-release.yaml index e1ed3a601..b7c7006dd 100644 --- a/.github/workflows/helm-multi-release.yaml +++ b/.github/workflows/helm-multi-release.yaml @@ -1,10 +1,6 @@ name: Helm Multi Release # Reusable workflow for packaging and publishing Helm charts having multiple subcharts on GitHub pages -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release - cancel-in-progress: true - on: workflow_call: inputs: @@ -48,6 +44,10 @@ on: description: "The GitHub token for committing the changes." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release + cancel-in-progress: true + jobs: helm-lint: runs-on: ubuntu-22.04 diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 587694c7e..a0b437a88 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -1,9 +1,5 @@ name: Reusable workflow for packaging and publishing Helm charts on GitHub pages -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release - cancel-in-progress: true - on: workflow_call: inputs: @@ -66,6 +62,10 @@ on: description: "The old version in your `.bumpversion.cfg` file." value: ${{ jobs.helm-release.outputs.old-version }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release + cancel-in-progress: true + jobs: helm-lint: runs-on: ubuntu-22.04 diff --git a/.github/workflows/java-gradle-base.yaml b/.github/workflows/java-gradle-base.yaml index 5ebde082e..c32c01cbf 100644 --- a/.github/workflows/java-gradle-base.yaml +++ b/.github/workflows/java-gradle-base.yaml @@ -1,9 +1,6 @@ name: Java Gradle Base # Reusable workflow for building testing and assessing code quality -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base - cancel-in-progress: true on: workflow_call: inputs: @@ -37,6 +34,7 @@ on: required: false type: string default: "." + secrets: signing-key-id: description: "Key id for signing the Sonatype publication." @@ -54,6 +52,10 @@ on: description: "Token for Sonarcloud." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base + cancel-in-progress: true + jobs: build: name: Build diff --git a/.github/workflows/java-gradle-docker.yaml b/.github/workflows/java-gradle-docker.yaml index c38fe1da2..59a76cb6a 100644 --- a/.github/workflows/java-gradle-docker.yaml +++ b/.github/workflows/java-gradle-docker.yaml @@ -1,10 +1,6 @@ name: Java Gradle Docker # Reusable workflow for building and publishing Java Gradle artifacts including a tarball image -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker - cancel-in-progress: true - on: workflow_call: inputs: @@ -37,6 +33,7 @@ on: required: false type: string default: "." + secrets: sonar-token: description: "Token for Sonarcloud." @@ -72,6 +69,10 @@ on: description: "GitHub token for requesting changes from API." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker + cancel-in-progress: true + jobs: build-and-test: name: Build, Test and Assess code quality diff --git a/.github/workflows/java-gradle-library.yaml b/.github/workflows/java-gradle-library.yaml index 1eaaeaf6a..8ba6adb09 100644 --- a/.github/workflows/java-gradle-library.yaml +++ b/.github/workflows/java-gradle-library.yaml @@ -1,9 +1,6 @@ name: Java Gradle library # Reusable workflow for building and publishing Java Gradle libraries -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib - cancel-in-progress: true on: workflow_call: inputs: @@ -32,6 +29,7 @@ on: required: false type: string default: "." + secrets: sonar-token: description: "Token for Sonarcloud." @@ -61,6 +59,10 @@ on: description: "GitHub token for requesting changes from API." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib + cancel-in-progress: true + jobs: build-and-test: name: Build, Test and Assess code quality diff --git a/.github/workflows/java-gradle-plugin.yaml b/.github/workflows/java-gradle-plugin.yaml index e222c2919..4c3690bc6 100644 --- a/.github/workflows/java-gradle-plugin.yaml +++ b/.github/workflows/java-gradle-plugin.yaml @@ -1,9 +1,6 @@ name: Java Gradle plugin # Reusable workflow for building and publishing Java Gradle plugins on the Gradle Plugin Portal -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin - cancel-in-progress: true on: workflow_call: inputs: @@ -32,6 +29,7 @@ on: required: false type: string default: "." + secrets: sonar-token: description: "Token for Sonarcloud." @@ -67,6 +65,10 @@ on: description: "GitHub token for requesting changes from API." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin + cancel-in-progress: true + jobs: build-and-test: name: Build, Test and Assess code quality diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 354707ee3..4cba62e79 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -1,10 +1,6 @@ name: Java Gradle Release # Reusable workflow for releasing Java Gradle projects -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release - cancel-in-progress: true - on: workflow_call: inputs: @@ -42,6 +38,7 @@ on: required: false type: string default: "." + secrets: github-username: description: "GitHub username for committing the changes." @@ -59,6 +56,10 @@ on: description: "Bumped version of your project." value: ${{ jobs.release.outputs.release-version }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release + cancel-in-progress: true + jobs: release: name: Release diff --git a/.github/workflows/kustomize-gke-deploy.yaml b/.github/workflows/kustomize-gke-deploy.yaml index 22fcc61d6..04a0ba292 100644 --- a/.github/workflows/kustomize-gke-deploy.yaml +++ b/.github/workflows/kustomize-gke-deploy.yaml @@ -1,10 +1,6 @@ name: Kustomize GKE Deploy # Reusable workflow for deploying resources with Kustomize on GKE Kubernetes -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy - cancel-in-progress: true - on: workflow_call: inputs: @@ -32,6 +28,7 @@ on: default: "v3.8.1" required: false type: string + secrets: gke-service-account: description: "GKE service account key for authentication" @@ -46,6 +43,10 @@ on: description: "GKE cluster for authentication" required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy + cancel-in-progress: true + jobs: deploy: name: Deploy diff --git a/.github/workflows/kustomize-gke-destroy.yaml b/.github/workflows/kustomize-gke-destroy.yaml index 2e3ecada5..1eadab80f 100644 --- a/.github/workflows/kustomize-gke-destroy.yaml +++ b/.github/workflows/kustomize-gke-destroy.yaml @@ -1,10 +1,6 @@ name: Kustomize GKE Destroy # Reusable workflow for destroying resources with Kustomize on GKE Kubernetes -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy - cancel-in-progress: true - on: workflow_call: inputs: @@ -27,6 +23,7 @@ on: default: "v3.8.1" required: false type: string + secrets: gke-service-account: description: "GKE service account key for authentication" @@ -41,6 +38,10 @@ on: description: "GKE cluster for authentication" required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy + cancel-in-progress: true + jobs: destroy: name: Destroy diff --git a/.github/workflows/python-poetry-publish-pypi.yaml b/.github/workflows/python-poetry-publish-pypi.yaml index 3fdd2cb65..05b91ff29 100644 --- a/.github/workflows/python-poetry-publish-pypi.yaml +++ b/.github/workflows/python-poetry-publish-pypi.yaml @@ -1,9 +1,5 @@ name: Reusable workflow for publishing to PyPI -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi - cancel-in-progress: true - on: workflow_call: inputs: @@ -27,11 +23,16 @@ on: required: false default: "./" type: string + secrets: pypi-token: description: "PyPI token" required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi + cancel-in-progress: true + jobs: publish: name: Publish diff --git a/.github/workflows/python-poetry-publish-snapshot.yaml b/.github/workflows/python-poetry-publish-snapshot.yaml index ed729e068..092f8d66b 100644 --- a/.github/workflows/python-poetry-publish-snapshot.yaml +++ b/.github/workflows/python-poetry-publish-snapshot.yaml @@ -1,9 +1,5 @@ name: Reusable workflow for publishing Python packages as snapshot -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot - cancel-in-progress: true - on: workflow_call: inputs: @@ -22,6 +18,7 @@ on: required: false default: "./" type: string + secrets: pypi-token: description: "TestPyPI token" @@ -36,6 +33,10 @@ on: description: "The old version of the package." value: ${{ jobs.publish-snapshot.outputs.old-version }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot + cancel-in-progress: true + jobs: publish-snapshot: name: Publish snapshot diff --git a/.github/workflows/python-poetry-release.yaml b/.github/workflows/python-poetry-release.yaml index 88797a016..47d60809f 100644 --- a/.github/workflows/python-poetry-release.yaml +++ b/.github/workflows/python-poetry-release.yaml @@ -1,9 +1,5 @@ name: Reusable workflow for building and releasing Python packages -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release - cancel-in-progress: true - on: workflow_call: inputs: @@ -41,6 +37,7 @@ on: required: false default: "./" type: string + secrets: github-username: description: "The GitHub username for committing the changes." @@ -61,6 +58,10 @@ on: description: "The old version of the package." value: ${{ jobs.create-release.outputs.old-version }} +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release + cancel-in-progress: true + jobs: create-release: name: Release diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index 5d1e32005..ca84824e2 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -1,9 +1,5 @@ name: Reusable workflow for releasing tag versions -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version - cancel-in-progress: true - on: workflow_call: inputs: @@ -24,6 +20,7 @@ on: required: false default: "SNAPSHOT" type: string + secrets: github-email: description: "The GitHub email for committing the changes." @@ -35,6 +32,10 @@ on: description: "The GitHub token for committing the changes." required: true +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version + cancel-in-progress: true + jobs: bump_and_release: runs-on: ubuntu-latest diff --git a/.github/workflows/test-python-setup-poetry.yaml b/.github/workflows/test-python-setup-poetry.yaml index e13959326..58d5580e7 100644 --- a/.github/workflows/test-python-setup-poetry.yaml +++ b/.github/workflows/test-python-setup-poetry.yaml @@ -1,9 +1,5 @@ name: Test python-setup-poetry action -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test-python-setup-poetry - cancel-in-progress: true - on: pull_request: branches: @@ -15,6 +11,10 @@ on: env: POETRY_VERSION: "1.2.2" +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test-python-setup-poetry + cancel-in-progress: true + jobs: tests: name: ${{ matrix.os }} / ${{ matrix.python-version }}