From 55c78909df381f02aa3d2bdd36e685bd17e7728d Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 15:55:14 +0100 Subject: [PATCH 01/11] Avoid concurrency --- .github/workflows/release-tag-versions.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index a19ff3af4..02386ea54 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -34,7 +34,9 @@ on: jobs: bump_and_release: runs-on: ubuntu-latest - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} steps: - name: Check out default branch uses: bakdata/ci-templates/actions/checkout@1.32.0 From 26ca2898c874edc591004acd49b82f5eb35d0ece Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 16:01:31 +0100 Subject: [PATCH 02/11] Set cancel to true --- .github/workflows/release-tag-versions.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index 02386ea54..42213565e 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -36,7 +36,8 @@ jobs: runs-on: ubuntu-latest concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version - cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} + cancel-in-progress: true + # cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} steps: - name: Check out default branch uses: bakdata/ci-templates/actions/checkout@1.32.0 From 8ee2412485e217bc733f40c094d9ad5a385af35f Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 16:10:10 +0100 Subject: [PATCH 03/11] Update every workflow --- .github/workflows/bump-version-release.yaml | 4 +++- .github/workflows/docker-build-and-publish.yaml | 4 +++- .github/workflows/helm-gke-deploy.yaml | 4 +++- .github/workflows/helm-gke-destroy.yaml | 4 +++- .github/workflows/helm-multi-release.yaml | 4 +++- .github/workflows/helm-release.yaml | 4 +++- .github/workflows/java-gradle-base.yaml | 4 +++- .github/workflows/java-gradle-docker.yaml | 3 +++ .github/workflows/java-gradle-library.yaml | 3 +++ .github/workflows/java-gradle-plugin.yaml | 3 +++ .github/workflows/java-gradle-release.yaml | 3 +++ .github/workflows/kustomize-gke-deploy.yaml | 3 +++ .github/workflows/kustomize-gke-destroy.yaml | 3 +++ .github/workflows/python-poetry-publish-pypi.yaml | 3 +++ .github/workflows/python-poetry-publish-snapshot.yaml | 3 +++ .github/workflows/python-poetry-release.yaml | 3 +++ .github/workflows/release-tag-versions.yaml | 1 - .github/workflows/test-python-setup-poetry.yaml | 3 +++ 18 files changed, 51 insertions(+), 8 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index 5bd7ba8ac..a19063a92 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -47,7 +47,9 @@ on: jobs: release: runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release + cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/docker-build-and-publish.yaml b/.github/workflows/docker-build-and-publish.yaml index 28375ec29..04a6b1138 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -71,7 +71,9 @@ jobs: docker-build: name: Docker build runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker + cancel-in-progress: true steps: - name: Check out repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-gke-deploy.yaml b/.github/workflows/helm-gke-deploy.yaml index efb15d304..3c32036c4 100644 --- a/.github/workflows/helm-gke-deploy.yaml +++ b/.github/workflows/helm-gke-deploy.yaml @@ -74,7 +74,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy + cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-gke-destroy.yaml b/.github/workflows/helm-gke-destroy.yaml index ea6c4686b..5141a4cdd 100644 --- a/.github/workflows/helm-gke-destroy.yaml +++ b/.github/workflows/helm-gke-destroy.yaml @@ -45,7 +45,9 @@ jobs: destroy: name: Destroy runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy + cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-multi-release.yaml b/.github/workflows/helm-multi-release.yaml index d8980bb02..3878ed5f3 100644 --- a/.github/workflows/helm-multi-release.yaml +++ b/.github/workflows/helm-multi-release.yaml @@ -47,7 +47,9 @@ on: jobs: helm-lint: runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release + cancel-in-progress: true steps: - name: Lint Helm chart uses: bakdata/ci-templates/actions/helm-lint@v1.10.0 diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index c7aa2a945..7be9c8c25 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -65,7 +65,9 @@ on: jobs: helm-lint: runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release + cancel-in-progress: true steps: - name: Lint Helm chart uses: bakdata/ci-templates/actions/helm-lint@v1.0.0 diff --git a/.github/workflows/java-gradle-base.yaml b/.github/workflows/java-gradle-base.yaml index 98eae76ad..b84c759ff 100644 --- a/.github/workflows/java-gradle-base.yaml +++ b/.github/workflows/java-gradle-base.yaml @@ -55,7 +55,9 @@ jobs: build: name: Build runs-on: ubuntu-22.04 - + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base + cancel-in-progress: true steps: - name: Build uses: bakdata/ci-templates/actions/java-gradle-build@v1.16.0 diff --git a/.github/workflows/java-gradle-docker.yaml b/.github/workflows/java-gradle-docker.yaml index 90e816142..e48733942 100644 --- a/.github/workflows/java-gradle-docker.yaml +++ b/.github/workflows/java-gradle-docker.yaml @@ -70,6 +70,9 @@ on: jobs: build-and-test: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker + cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-library.yaml b/.github/workflows/java-gradle-library.yaml index 02daba5d1..677f1d770 100644 --- a/.github/workflows/java-gradle-library.yaml +++ b/.github/workflows/java-gradle-library.yaml @@ -60,6 +60,9 @@ on: jobs: build-and-test: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib + cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-plugin.yaml b/.github/workflows/java-gradle-plugin.yaml index 50363340f..1e214ddb8 100644 --- a/.github/workflows/java-gradle-plugin.yaml +++ b/.github/workflows/java-gradle-plugin.yaml @@ -66,6 +66,9 @@ on: jobs: build-and-test: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin + cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 374b3e2a8..198ae7607 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -59,6 +59,9 @@ jobs: release: name: Release runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release + cancel-in-progress: true # Map the job outputs to step outputs outputs: diff --git a/.github/workflows/kustomize-gke-deploy.yaml b/.github/workflows/kustomize-gke-deploy.yaml index 8b4d4d242..ba46d6d47 100644 --- a/.github/workflows/kustomize-gke-deploy.yaml +++ b/.github/workflows/kustomize-gke-deploy.yaml @@ -46,6 +46,9 @@ jobs: deploy: name: Deploy runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy + cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/kustomize-gke-destroy.yaml b/.github/workflows/kustomize-gke-destroy.yaml index c284e50e3..b5d7807ec 100644 --- a/.github/workflows/kustomize-gke-destroy.yaml +++ b/.github/workflows/kustomize-gke-destroy.yaml @@ -41,6 +41,9 @@ jobs: destroy: name: Destroy runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy + cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/python-poetry-publish-pypi.yaml b/.github/workflows/python-poetry-publish-pypi.yaml index 1c23b92fd..b66ea5c6c 100644 --- a/.github/workflows/python-poetry-publish-pypi.yaml +++ b/.github/workflows/python-poetry-publish-pypi.yaml @@ -32,6 +32,9 @@ jobs: publish: name: Publish runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi + cancel-in-progress: true steps: - name: Check out repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/python-poetry-publish-snapshot.yaml b/.github/workflows/python-poetry-publish-snapshot.yaml index 3e6746e61..bdcd37dc7 100644 --- a/.github/workflows/python-poetry-publish-snapshot.yaml +++ b/.github/workflows/python-poetry-publish-snapshot.yaml @@ -36,6 +36,9 @@ jobs: publish-snapshot: name: Publish snapshot runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot + cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/python-poetry-release.yaml b/.github/workflows/python-poetry-release.yaml index 7975e3d0a..a5abed1b0 100644 --- a/.github/workflows/python-poetry-release.yaml +++ b/.github/workflows/python-poetry-release.yaml @@ -61,6 +61,9 @@ jobs: create-release: name: Release runs-on: ubuntu-22.04 + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release + cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index 42213565e..5b89831ad 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -37,7 +37,6 @@ jobs: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version cancel-in-progress: true - # cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} steps: - name: Check out default branch uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/test-python-setup-poetry.yaml b/.github/workflows/test-python-setup-poetry.yaml index 6ef1a6093..8d6d45bb4 100644 --- a/.github/workflows/test-python-setup-poetry.yaml +++ b/.github/workflows/test-python-setup-poetry.yaml @@ -13,6 +13,9 @@ env: jobs: tests: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test-python-setup-poetry + cancel-in-progress: true name: ${{ matrix.os }} / ${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest strategy: From 211125aecb85fec665587dc6fa2757bff2caacf8 Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 16:47:38 +0100 Subject: [PATCH 04/11] Set concurrency to repo-level --- .github/workflows/bump-version-release.yaml | 6 +++--- .github/workflows/docker-build-and-publish.yaml | 6 +++--- .github/workflows/helm-gke-deploy.yaml | 6 +++--- .github/workflows/helm-gke-destroy.yaml | 6 +++--- .github/workflows/helm-multi-release.yaml | 8 ++++---- .github/workflows/helm-release.yaml | 6 +++--- .github/workflows/java-gradle-base.yaml | 6 +++--- .github/workflows/java-gradle-docker.yaml | 6 +++--- .github/workflows/java-gradle-library.yaml | 6 +++--- .github/workflows/java-gradle-plugin.yaml | 6 +++--- .github/workflows/java-gradle-release.yaml | 6 +++--- .github/workflows/kustomize-gke-deploy.yaml | 6 +++--- .github/workflows/kustomize-gke-destroy.yaml | 6 +++--- .github/workflows/python-poetry-publish-pypi.yaml | 6 +++--- .github/workflows/python-poetry-publish-snapshot.yaml | 6 +++--- .github/workflows/python-poetry-release.yaml | 6 +++--- .github/workflows/release-tag-versions.yaml | 6 +++--- .github/workflows/test-python-setup-poetry.yaml | 7 ++++--- 18 files changed, 56 insertions(+), 55 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index a19063a92..b0cd91f5e 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -3,6 +3,9 @@ name: Bump Version Release on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release + cancel-in-progress: true inputs: release-type: description: "Scope of the release (major, minor or patch)." @@ -47,9 +50,6 @@ on: jobs: release: runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release - cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/docker-build-and-publish.yaml b/.github/workflows/docker-build-and-publish.yaml index 04a6b1138..82316d573 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -3,6 +3,9 @@ name: Docker build and publish on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker + cancel-in-progress: true inputs: docker-context: description: "The docker context." @@ -71,9 +74,6 @@ jobs: docker-build: name: Docker build runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker - cancel-in-progress: true steps: - name: Check out repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-gke-deploy.yaml b/.github/workflows/helm-gke-deploy.yaml index 3c32036c4..0d7877134 100644 --- a/.github/workflows/helm-gke-deploy.yaml +++ b/.github/workflows/helm-gke-deploy.yaml @@ -3,6 +3,9 @@ name: Helm GKE Deploy on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy + cancel-in-progress: true inputs: release-name: description: "Helm release name" @@ -74,9 +77,6 @@ jobs: deploy: name: Deploy runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy - cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-gke-destroy.yaml b/.github/workflows/helm-gke-destroy.yaml index 5141a4cdd..ac68cc614 100644 --- a/.github/workflows/helm-gke-destroy.yaml +++ b/.github/workflows/helm-gke-destroy.yaml @@ -3,6 +3,9 @@ name: Helm GKE Destroy on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy + cancel-in-progress: true inputs: release-name: description: "Helm release name" @@ -45,9 +48,6 @@ jobs: destroy: name: Destroy runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy - cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/helm-multi-release.yaml b/.github/workflows/helm-multi-release.yaml index 3878ed5f3..6ff857bd7 100644 --- a/.github/workflows/helm-multi-release.yaml +++ b/.github/workflows/helm-multi-release.yaml @@ -3,6 +3,9 @@ name: Helm Multi Release on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release + cancel-in-progress: true inputs: charts-path: description: "The directory containing the Helm chart(s)." @@ -47,9 +50,6 @@ on: jobs: helm-lint: runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release - cancel-in-progress: true steps: - name: Lint Helm chart uses: bakdata/ci-templates/actions/helm-lint@v1.10.0 @@ -136,7 +136,7 @@ jobs: publish-artifacts: runs-on: ubuntu-22.04 - needs: [package-new-artifacts,update-version] + needs: [package-new-artifacts, update-version] env: artifact-dir: "${{ inputs.artifact-dir }}" charts-path: "${{ inputs.artifact-dir }}" diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 7be9c8c25..1ef426106 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -2,6 +2,9 @@ name: Reusable workflow for packaging and publishing Helm charts on GitHub pages on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release + cancel-in-progress: true inputs: page-url: description: "URL to the GitHub pages website of the repository." @@ -65,9 +68,6 @@ on: jobs: helm-lint: runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release - cancel-in-progress: true steps: - name: Lint Helm chart uses: bakdata/ci-templates/actions/helm-lint@v1.0.0 diff --git a/.github/workflows/java-gradle-base.yaml b/.github/workflows/java-gradle-base.yaml index b84c759ff..e2aa0017c 100644 --- a/.github/workflows/java-gradle-base.yaml +++ b/.github/workflows/java-gradle-base.yaml @@ -9,6 +9,9 @@ on: required: false type: boolean default: false + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base + cancel-in-progress: true gradle-cache: description: "Whether Gradle caching is enabled or not. (Default is true)" required: false @@ -55,9 +58,6 @@ jobs: build: name: Build runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base - cancel-in-progress: true steps: - name: Build uses: bakdata/ci-templates/actions/java-gradle-build@v1.16.0 diff --git a/.github/workflows/java-gradle-docker.yaml b/.github/workflows/java-gradle-docker.yaml index e48733942..9c92c6fb3 100644 --- a/.github/workflows/java-gradle-docker.yaml +++ b/.github/workflows/java-gradle-docker.yaml @@ -3,6 +3,9 @@ name: Java Gradle Docker on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker + cancel-in-progress: true inputs: docker-publisher: description: "Publisher to prefix Docker image." @@ -70,9 +73,6 @@ on: jobs: build-and-test: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker - cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-library.yaml b/.github/workflows/java-gradle-library.yaml index 677f1d770..ced064603 100644 --- a/.github/workflows/java-gradle-library.yaml +++ b/.github/workflows/java-gradle-library.yaml @@ -3,6 +3,9 @@ name: Java Gradle library on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib + cancel-in-progress: true inputs: java-distribution: description: "Java distribution to be installed. (Default is microsoft)" @@ -60,9 +63,6 @@ on: jobs: build-and-test: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib - cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-plugin.yaml b/.github/workflows/java-gradle-plugin.yaml index 1e214ddb8..8c1c09205 100644 --- a/.github/workflows/java-gradle-plugin.yaml +++ b/.github/workflows/java-gradle-plugin.yaml @@ -3,6 +3,9 @@ name: Java Gradle plugin on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin + cancel-in-progress: true inputs: java-distribution: description: "Java distribution to be installed. (Default is microsoft)" @@ -66,9 +69,6 @@ on: jobs: build-and-test: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin - cancel-in-progress: true name: Build, Test and Assess code quality uses: bakdata/ci-templates/.github/workflows/java-gradle-base.yaml@1.39.0 with: diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 198ae7607..dd0fa4703 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -3,6 +3,9 @@ name: Java Gradle Release on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release + cancel-in-progress: true inputs: release-type: description: "Scope of the release (major, minor or patch)." @@ -59,9 +62,6 @@ jobs: release: name: Release runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release - cancel-in-progress: true # Map the job outputs to step outputs outputs: diff --git a/.github/workflows/kustomize-gke-deploy.yaml b/.github/workflows/kustomize-gke-deploy.yaml index ba46d6d47..f4a8e5fc3 100644 --- a/.github/workflows/kustomize-gke-deploy.yaml +++ b/.github/workflows/kustomize-gke-deploy.yaml @@ -3,6 +3,9 @@ name: Kustomize GKE Deploy on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy + cancel-in-progress: true inputs: kustomization-path: description: "Path to the root directory of the kustomization" @@ -46,9 +49,6 @@ jobs: deploy: name: Deploy runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy - cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/kustomize-gke-destroy.yaml b/.github/workflows/kustomize-gke-destroy.yaml index b5d7807ec..92387c6b3 100644 --- a/.github/workflows/kustomize-gke-destroy.yaml +++ b/.github/workflows/kustomize-gke-destroy.yaml @@ -3,6 +3,9 @@ name: Kustomize GKE Destroy on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy + cancel-in-progress: true inputs: kustomization-path: description: "Path to the root directory of the kustomization" @@ -41,9 +44,6 @@ jobs: destroy: name: Destroy runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy - cancel-in-progress: true steps: - name: Checkout repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/python-poetry-publish-pypi.yaml b/.github/workflows/python-poetry-publish-pypi.yaml index b66ea5c6c..66fcbb341 100644 --- a/.github/workflows/python-poetry-publish-pypi.yaml +++ b/.github/workflows/python-poetry-publish-pypi.yaml @@ -2,6 +2,9 @@ name: Reusable workflow for publishing to PyPI on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi + cancel-in-progress: true inputs: publish-to-test: description: "If set to false, the packages are published to PyPI. (Default is true)" @@ -32,9 +35,6 @@ jobs: publish: name: Publish runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi - cancel-in-progress: true steps: - name: Check out repository uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/python-poetry-publish-snapshot.yaml b/.github/workflows/python-poetry-publish-snapshot.yaml index bdcd37dc7..c5a6d106d 100644 --- a/.github/workflows/python-poetry-publish-snapshot.yaml +++ b/.github/workflows/python-poetry-publish-snapshot.yaml @@ -2,6 +2,9 @@ name: Reusable workflow for publishing Python packages as snapshot on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot + cancel-in-progress: true inputs: python-version: description: "The Python version for setting up Poetry. (Default is 3.10)" @@ -36,9 +39,6 @@ jobs: publish-snapshot: name: Publish snapshot runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot - cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/python-poetry-release.yaml b/.github/workflows/python-poetry-release.yaml index a5abed1b0..484f37068 100644 --- a/.github/workflows/python-poetry-release.yaml +++ b/.github/workflows/python-poetry-release.yaml @@ -2,6 +2,9 @@ name: Reusable workflow for building and releasing Python packages on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release + cancel-in-progress: true inputs: release-type: description: "Scope of the release; See: https://python-poetry.org/docs/cli/#version" @@ -61,9 +64,6 @@ jobs: create-release: name: Release runs-on: ubuntu-22.04 - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release - cancel-in-progress: true # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index 5b89831ad..0b0f61eea 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -2,6 +2,9 @@ name: Reusable workflow for releasing tag versions on: workflow_call: + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version + cancel-in-progress: true inputs: version-configs-dir: description: "The Path to the directory containing the file where the versioning is defined and `.bumpversion.cfg` file." @@ -34,9 +37,6 @@ on: jobs: bump_and_release: runs-on: ubuntu-latest - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version - cancel-in-progress: true steps: - name: Check out default branch uses: bakdata/ci-templates/actions/checkout@1.32.0 diff --git a/.github/workflows/test-python-setup-poetry.yaml b/.github/workflows/test-python-setup-poetry.yaml index 8d6d45bb4..58d5580e7 100644 --- a/.github/workflows/test-python-setup-poetry.yaml +++ b/.github/workflows/test-python-setup-poetry.yaml @@ -11,11 +11,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test-python-setup-poetry - cancel-in-progress: true name: ${{ matrix.os }} / ${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest strategy: From 4b577446b76c00040006403e2d96eaca6e69dac6 Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 17:03:10 +0100 Subject: [PATCH 05/11] Set concurrency to workflow-level --- .github/workflows/bump-version-release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index b0cd91f5e..b6fde58aa 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -3,9 +3,6 @@ name: Bump Version Release on: workflow_call: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release - cancel-in-progress: true inputs: release-type: description: "Scope of the release (major, minor or patch)." @@ -38,6 +35,9 @@ on: description: "The GitHub token for committing the changes." required: true + concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release + cancel-in-progress: true # Map the workflow outputs to job outputs outputs: release-version: From 6cdcf7bfca7bdb7bb6405b9a4aa1d6ffacbf05e5 Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 17:11:36 +0100 Subject: [PATCH 06/11] Set concurrency to workow --- .github/workflows/bump-version-release.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index b6fde58aa..36457fa35 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -35,9 +35,6 @@ on: description: "The GitHub token for committing the changes." required: true - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-bump-version-release - cancel-in-progress: true # Map the workflow outputs to job outputs outputs: release-version: @@ -46,6 +43,9 @@ on: old-version: 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: From 599a850c1e6f25af76054353521d15b13a2fd9de Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Mon, 6 Nov 2023 17:18:10 +0100 Subject: [PATCH 07/11] Clean code --- .github/workflows/bump-version-release.yaml | 7 ++++--- .github/workflows/docker-build-and-publish.yaml | 6 +++--- .github/workflows/helm-gke-deploy.yaml | 7 ++++--- .github/workflows/helm-gke-destroy.yaml | 7 ++++--- .github/workflows/helm-multi-release.yaml | 7 ++++--- .github/workflows/helm-release.yaml | 7 ++++--- .github/workflows/java-gradle-base.yaml | 6 +++--- .github/workflows/java-gradle-docker.yaml | 7 ++++--- .github/workflows/java-gradle-library.yaml | 6 +++--- .github/workflows/java-gradle-plugin.yaml | 6 +++--- .github/workflows/java-gradle-release.yaml | 7 ++++--- .github/workflows/kustomize-gke-deploy.yaml | 7 ++++--- .github/workflows/kustomize-gke-destroy.yaml | 7 ++++--- .github/workflows/python-poetry-publish-pypi.yaml | 7 ++++--- .github/workflows/python-poetry-publish-snapshot.yaml | 7 ++++--- .github/workflows/python-poetry-release.yaml | 7 ++++--- .github/workflows/release-tag-versions.yaml | 7 ++++--- .github/workflows/test-python-setup-poetry.yaml | 8 ++++---- 18 files changed, 68 insertions(+), 55 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index 36457fa35..5d5b14eb7 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -1,6 +1,10 @@ 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: @@ -43,9 +47,6 @@ on: old-version: 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: diff --git a/.github/workflows/docker-build-and-publish.yaml b/.github/workflows/docker-build-and-publish.yaml index 82316d573..2b8b55d4e 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -1,11 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker - cancel-in-progress: true inputs: docker-context: description: "The docker context." diff --git a/.github/workflows/helm-gke-deploy.yaml b/.github/workflows/helm-gke-deploy.yaml index 0d7877134..ac923b927 100644 --- a/.github/workflows/helm-gke-deploy.yaml +++ b/.github/workflows/helm-gke-deploy.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy - cancel-in-progress: true inputs: release-name: description: "Helm release name" diff --git a/.github/workflows/helm-gke-destroy.yaml b/.github/workflows/helm-gke-destroy.yaml index ac68cc614..d97bf25b5 100644 --- a/.github/workflows/helm-gke-destroy.yaml +++ b/.github/workflows/helm-gke-destroy.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy - cancel-in-progress: true inputs: release-name: description: "Helm release name" diff --git a/.github/workflows/helm-multi-release.yaml b/.github/workflows/helm-multi-release.yaml index 6ff857bd7..e1ed3a601 100644 --- a/.github/workflows/helm-multi-release.yaml +++ b/.github/workflows/helm-multi-release.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release - cancel-in-progress: true inputs: charts-path: description: "The directory containing the Helm chart(s)." diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index 1ef426106..587694c7e 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -1,10 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release - cancel-in-progress: true inputs: page-url: description: "URL to the GitHub pages website of the repository." diff --git a/.github/workflows/java-gradle-base.yaml b/.github/workflows/java-gradle-base.yaml index e2aa0017c..5ebde082e 100644 --- a/.github/workflows/java-gradle-base.yaml +++ b/.github/workflows/java-gradle-base.yaml @@ -1,6 +1,9 @@ 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: @@ -9,9 +12,6 @@ on: required: false type: boolean default: false - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base - cancel-in-progress: true gradle-cache: description: "Whether Gradle caching is enabled or not. (Default is true)" required: false diff --git a/.github/workflows/java-gradle-docker.yaml b/.github/workflows/java-gradle-docker.yaml index 9c92c6fb3..c38fe1da2 100644 --- a/.github/workflows/java-gradle-docker.yaml +++ b/.github/workflows/java-gradle-docker.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker - cancel-in-progress: true inputs: docker-publisher: description: "Publisher to prefix Docker image." diff --git a/.github/workflows/java-gradle-library.yaml b/.github/workflows/java-gradle-library.yaml index ced064603..1eaaeaf6a 100644 --- a/.github/workflows/java-gradle-library.yaml +++ b/.github/workflows/java-gradle-library.yaml @@ -1,11 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib - cancel-in-progress: true inputs: java-distribution: description: "Java distribution to be installed. (Default is microsoft)" diff --git a/.github/workflows/java-gradle-plugin.yaml b/.github/workflows/java-gradle-plugin.yaml index 8c1c09205..e222c2919 100644 --- a/.github/workflows/java-gradle-plugin.yaml +++ b/.github/workflows/java-gradle-plugin.yaml @@ -1,11 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin - cancel-in-progress: true inputs: java-distribution: description: "Java distribution to be installed. (Default is microsoft)" diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index dd0fa4703..354707ee3 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-release - cancel-in-progress: true inputs: release-type: description: "Scope of the release (major, minor or patch)." diff --git a/.github/workflows/kustomize-gke-deploy.yaml b/.github/workflows/kustomize-gke-deploy.yaml index f4a8e5fc3..22fcc61d6 100644 --- a/.github/workflows/kustomize-gke-deploy.yaml +++ b/.github/workflows/kustomize-gke-deploy.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy - cancel-in-progress: true inputs: kustomization-path: description: "Path to the root directory of the kustomization" diff --git a/.github/workflows/kustomize-gke-destroy.yaml b/.github/workflows/kustomize-gke-destroy.yaml index 92387c6b3..2e3ecada5 100644 --- a/.github/workflows/kustomize-gke-destroy.yaml +++ b/.github/workflows/kustomize-gke-destroy.yaml @@ -1,11 +1,12 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy - cancel-in-progress: true inputs: kustomization-path: description: "Path to the root directory of the kustomization" diff --git a/.github/workflows/python-poetry-publish-pypi.yaml b/.github/workflows/python-poetry-publish-pypi.yaml index 66fcbb341..3fdd2cb65 100644 --- a/.github/workflows/python-poetry-publish-pypi.yaml +++ b/.github/workflows/python-poetry-publish-pypi.yaml @@ -1,10 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi - cancel-in-progress: true inputs: publish-to-test: description: "If set to false, the packages are published to PyPI. (Default is true)" diff --git a/.github/workflows/python-poetry-publish-snapshot.yaml b/.github/workflows/python-poetry-publish-snapshot.yaml index c5a6d106d..ed729e068 100644 --- a/.github/workflows/python-poetry-publish-snapshot.yaml +++ b/.github/workflows/python-poetry-publish-snapshot.yaml @@ -1,10 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot - cancel-in-progress: true inputs: python-version: description: "The Python version for setting up Poetry. (Default is 3.10)" diff --git a/.github/workflows/python-poetry-release.yaml b/.github/workflows/python-poetry-release.yaml index 484f37068..88797a016 100644 --- a/.github/workflows/python-poetry-release.yaml +++ b/.github/workflows/python-poetry-release.yaml @@ -1,10 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-release - cancel-in-progress: true inputs: release-type: description: "Scope of the release; See: https://python-poetry.org/docs/cli/#version" diff --git a/.github/workflows/release-tag-versions.yaml b/.github/workflows/release-tag-versions.yaml index 0b0f61eea..5d1e32005 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -1,10 +1,11 @@ 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: - concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-release-version - cancel-in-progress: true inputs: version-configs-dir: description: "The Path to the directory containing the file where the versioning is defined and `.bumpversion.cfg` file." diff --git a/.github/workflows/test-python-setup-poetry.yaml b/.github/workflows/test-python-setup-poetry.yaml index 58d5580e7..e13959326 100644 --- a/.github/workflows/test-python-setup-poetry.yaml +++ b/.github/workflows/test-python-setup-poetry.yaml @@ -1,5 +1,9 @@ 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: @@ -11,10 +15,6 @@ 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 }} From 56527a003fb98e9341bb96cdc14800c832a1aefc Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Wed, 8 Nov 2023 11:50:40 +0100 Subject: [PATCH 08/11] 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 }} From 6cb06fcc745a870f5bcd8913cb5d3e9f19dd45be Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Fri, 10 Nov 2023 13:53:28 +0100 Subject: [PATCH 09/11] Cancel only on tag branch. and avoid canceling in workflows that create/release tags --- .github/workflows/bump-version-release.yaml | 4 ---- .github/workflows/docker-build-and-publish.yaml | 2 +- .github/workflows/helm-gke-deploy.yaml | 4 ++-- .github/workflows/helm-gke-destroy.yaml | 4 ++-- .github/workflows/helm-multi-release.yaml | 2 +- .github/workflows/helm-release.yaml | 2 +- .github/workflows/java-gradle-base.yaml | 2 +- .github/workflows/java-gradle-docker.yaml | 2 +- .github/workflows/java-gradle-library.yaml | 2 +- .github/workflows/java-gradle-plugin.yaml | 2 +- .github/workflows/java-gradle-release.yaml | 4 ---- .github/workflows/kustomize-gke-deploy.yaml | 2 +- .github/workflows/kustomize-gke-destroy.yaml | 2 +- .github/workflows/python-poetry-publish-pypi.yaml | 2 +- .github/workflows/python-poetry-publish-snapshot.yaml | 2 +- .github/workflows/python-poetry-release.yaml | 4 ---- .github/workflows/release-tag-versions.yaml | 4 ---- .github/workflows/test-python-setup-poetry.yaml | 2 +- 18 files changed, 16 insertions(+), 32 deletions(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index 1246f2eb3..a891d118e 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -44,10 +44,6 @@ 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 c49edb1f8..cb51c61c3 100644 --- a/.github/workflows/docker-build-and-publish.yaml +++ b/.github/workflows/docker-build-and-publish.yaml @@ -70,7 +70,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-docker - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: docker-build: diff --git a/.github/workflows/helm-gke-deploy.yaml b/.github/workflows/helm-gke-deploy.yaml index 61023c6a0..5f1e226a7 100644 --- a/.github/workflows/helm-gke-deploy.yaml +++ b/.github/workflows/helm-gke-deploy.yaml @@ -72,8 +72,8 @@ on: required: true concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-deploy - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-gke-deploy + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: deploy: diff --git a/.github/workflows/helm-gke-destroy.yaml b/.github/workflows/helm-gke-destroy.yaml index 5aab2803f..45b28105f 100644 --- a/.github/workflows/helm-gke-destroy.yaml +++ b/.github/workflows/helm-gke-destroy.yaml @@ -43,8 +43,8 @@ on: required: true concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-destroy - cancel-in-progress: true + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-gke-destroy + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: destroy: diff --git a/.github/workflows/helm-multi-release.yaml b/.github/workflows/helm-multi-release.yaml index b7c7006dd..7a2020a04 100644 --- a/.github/workflows/helm-multi-release.yaml +++ b/.github/workflows/helm-multi-release.yaml @@ -46,7 +46,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-multi-release - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: helm-lint: diff --git a/.github/workflows/helm-release.yaml b/.github/workflows/helm-release.yaml index a0b437a88..d2cc37fdc 100644 --- a/.github/workflows/helm-release.yaml +++ b/.github/workflows/helm-release.yaml @@ -64,7 +64,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-helm-release - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: helm-lint: diff --git a/.github/workflows/java-gradle-base.yaml b/.github/workflows/java-gradle-base.yaml index c32c01cbf..ec399c913 100644 --- a/.github/workflows/java-gradle-base.yaml +++ b/.github/workflows/java-gradle-base.yaml @@ -54,7 +54,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-base - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: build: diff --git a/.github/workflows/java-gradle-docker.yaml b/.github/workflows/java-gradle-docker.yaml index 59a76cb6a..282f9e3f0 100644 --- a/.github/workflows/java-gradle-docker.yaml +++ b/.github/workflows/java-gradle-docker.yaml @@ -71,7 +71,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-docker - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: build-and-test: diff --git a/.github/workflows/java-gradle-library.yaml b/.github/workflows/java-gradle-library.yaml index 8ba6adb09..0b70789cc 100644 --- a/.github/workflows/java-gradle-library.yaml +++ b/.github/workflows/java-gradle-library.yaml @@ -61,7 +61,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-lib - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: build-and-test: diff --git a/.github/workflows/java-gradle-plugin.yaml b/.github/workflows/java-gradle-plugin.yaml index 4c3690bc6..69b6945ba 100644 --- a/.github/workflows/java-gradle-plugin.yaml +++ b/.github/workflows/java-gradle-plugin.yaml @@ -67,7 +67,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-java-gradle-plugin - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: build-and-test: diff --git a/.github/workflows/java-gradle-release.yaml b/.github/workflows/java-gradle-release.yaml index 4cba62e79..247523c43 100644 --- a/.github/workflows/java-gradle-release.yaml +++ b/.github/workflows/java-gradle-release.yaml @@ -56,10 +56,6 @@ 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 04a0ba292..0d46b56fa 100644 --- a/.github/workflows/kustomize-gke-deploy.yaml +++ b/.github/workflows/kustomize-gke-deploy.yaml @@ -45,7 +45,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-deploy - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: deploy: diff --git a/.github/workflows/kustomize-gke-destroy.yaml b/.github/workflows/kustomize-gke-destroy.yaml index 1eadab80f..f00981a71 100644 --- a/.github/workflows/kustomize-gke-destroy.yaml +++ b/.github/workflows/kustomize-gke-destroy.yaml @@ -40,7 +40,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-kustomize-gke-destroy - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: destroy: diff --git a/.github/workflows/python-poetry-publish-pypi.yaml b/.github/workflows/python-poetry-publish-pypi.yaml index 05b91ff29..e2c1dcb8f 100644 --- a/.github/workflows/python-poetry-publish-pypi.yaml +++ b/.github/workflows/python-poetry-publish-pypi.yaml @@ -31,7 +31,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-pypi - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: publish: diff --git a/.github/workflows/python-poetry-publish-snapshot.yaml b/.github/workflows/python-poetry-publish-snapshot.yaml index 092f8d66b..054b025bd 100644 --- a/.github/workflows/python-poetry-publish-snapshot.yaml +++ b/.github/workflows/python-poetry-publish-snapshot.yaml @@ -35,7 +35,7 @@ on: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-python-poetry-publish-snapshot - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: publish-snapshot: diff --git a/.github/workflows/python-poetry-release.yaml b/.github/workflows/python-poetry-release.yaml index 47d60809f..c20a6eb01 100644 --- a/.github/workflows/python-poetry-release.yaml +++ b/.github/workflows/python-poetry-release.yaml @@ -58,10 +58,6 @@ 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 ca84824e2..3578ea300 100644 --- a/.github/workflows/release-tag-versions.yaml +++ b/.github/workflows/release-tag-versions.yaml @@ -32,10 +32,6 @@ 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 58d5580e7..d7ee58044 100644 --- a/.github/workflows/test-python-setup-poetry.yaml +++ b/.github/workflows/test-python-setup-poetry.yaml @@ -13,7 +13,7 @@ env: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-test-python-setup-poetry - cancel-in-progress: true + cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} jobs: tests: From b4217fcc61778aa055ed59ec97d3086d86b1a20f Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Fri, 10 Nov 2023 13:55:38 +0100 Subject: [PATCH 10/11] Clean code --- .github/workflows/bump-version-release.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index a891d118e..098832353 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -47,6 +47,7 @@ on: jobs: release: runs-on: ubuntu-22.04 + # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }} From 92e6170b0800d7176831c095c984a42ca5745d2f Mon Sep 17 00:00:00 2001 From: MichaelKora Date: Fri, 10 Nov 2023 13:56:12 +0100 Subject: [PATCH 11/11] Clean code --- .github/workflows/bump-version-release.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/bump-version-release.yaml b/.github/workflows/bump-version-release.yaml index 098832353..a891d118e 100644 --- a/.github/workflows/bump-version-release.yaml +++ b/.github/workflows/bump-version-release.yaml @@ -47,7 +47,6 @@ on: jobs: release: runs-on: ubuntu-22.04 - # Map the job outputs to step outputs outputs: release-version: ${{ steps.bump-version.outputs.release-version }}