Skip to content

Commit

Permalink
Cancel only on tag branch. and avoid canceling in workflows that crea…
Browse files Browse the repository at this point in the history
…te/release tags
  • Loading branch information
MichaelKora committed Nov 10, 2023
1 parent 56527a0 commit 6cb06fc
Show file tree
Hide file tree
Showing 18 changed files with 16 additions and 32 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/bump-version-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docker-build-and-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/helm-gke-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/helm-gke-destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-multi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/helm-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-library.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/java-gradle-plugin.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/java-gradle-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kustomize-gke-deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/kustomize-gke-destroy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-poetry-publish-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/python-poetry-publish-snapshot.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/python-poetry-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/release-tag-versions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test-python-setup-poetry.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 6cb06fc

Please sign in to comment.