Skip to content

Commit

Permalink
Move concurrency block after the vars
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKora committed Nov 8, 2023
1 parent 599a850 commit 56527a0
Show file tree
Hide file tree
Showing 18 changed files with 86 additions and 68 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bump-version-release.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/docker-build-and-publish.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -57,6 +54,7 @@ on:
required: false
default: "."
type: string

secrets:
docker-user:
description: "Username for the Docker registry login."
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/helm-gke-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -60,6 +56,7 @@ on:
default: "v3.8.1"
required: false
type: string

secrets:
gke-service-account:
description: "GKE service account key for authentication"
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/helm-gke-destroy.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -31,6 +27,7 @@ on:
default: "v3.8.1"
required: false
type: string

secrets:
gke-service-account:
description: "GKE service account key for authentication"
Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/helm-multi-release.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/java-gradle-base.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -37,6 +34,7 @@ on:
required: false
type: string
default: "."

secrets:
signing-key-id:
description: "Key id for signing the Sonatype publication."
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/java-gradle-docker.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -37,6 +33,7 @@ on:
required: false
type: string
default: "."

secrets:
sonar-token:
description: "Token for Sonarcloud."
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/java-gradle-library.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -32,6 +29,7 @@ on:
required: false
type: string
default: "."

secrets:
sonar-token:
description: "Token for Sonarcloud."
Expand Down Expand Up @@ -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
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/java-gradle-plugin.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -32,6 +29,7 @@ on:
required: false
type: string
default: "."

secrets:
sonar-token:
description: "Token for Sonarcloud."
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/java-gradle-release.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -42,6 +38,7 @@ on:
required: false
type: string
default: "."

secrets:
github-username:
description: "GitHub username for committing the changes."
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/kustomize-gke-deploy.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -32,6 +28,7 @@ on:
default: "v3.8.1"
required: false
type: string

secrets:
gke-service-account:
description: "GKE service account key for authentication"
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/kustomize-gke-destroy.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -27,6 +23,7 @@ on:
default: "v3.8.1"
required: false
type: string

secrets:
gke-service-account:
description: "GKE service account key for authentication"
Expand All @@ -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
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/python-poetry-publish-pypi.yaml
Original file line number Diff line number Diff line change
@@ -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:
Expand All @@ -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
Expand Down
Loading

0 comments on commit 56527a0

Please sign in to comment.