Skip to content

Commit

Permalink
Cancel running builds
Browse files Browse the repository at this point in the history
Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
  • Loading branch information
s0undt3ch committed Nov 24, 2023
1 parent 29a3b46 commit 6748ff6
Show file tree
Hide file tree
Showing 30 changed files with 90 additions and 180 deletions.
9 changes: 3 additions & 6 deletions .github/workflows/.container.template.j2
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: <{ repository_path }>-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: <{ repository_path }>-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/almalinux-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/almalinux-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/almalinux-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/amazonlinux-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/amazonlinux-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/amazonlinux-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/archlinux-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/archlinux-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/archlinux-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/busybox-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/busybox-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/busybox-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/centos-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/centos-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/centos-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/centos-stream-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/centos-stream-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/centos-stream-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/consul-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/consul-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/consul-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/debian-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/debian-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/debian-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/etcd-v2-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/etcd-v2-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/etcd-v2-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/etcd-v3-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/etcd-v3-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/etcd-v3-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/fedora-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/fedora-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/fedora-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/mariadb-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/mariadb-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/mariadb-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/mysql-server-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/mysql-server-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/mysql-server-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/openldap-minion-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: custom/openldap-minion-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: custom/openldap-minion-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/opensuse-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: mirrors/opensuse-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: mirrors/opensuse-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/packaging-containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,8 @@ env:


concurrency:
# Concurrency is defined in a way that concurrent builds against branches do
# not cancel previous builds.
# However, for every new build against the same pull request source branch,
# all older builds against that same branch get canceled.
group: custom/packaging-${{ github.workflow }}-${{ github.event_name }}-${{ github.head_ref || github.run_id }}
# New builds always cancel previous, still running, builds
group: custom/packaging-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
Expand Down Expand Up @@ -143,7 +140,7 @@ jobs:
context: ${{ env.PATH_IN_REPO }}
platforms: ${{ matrix.dockerinfo.platform }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }},push-by-digest=true,name-canonical=true,push=true
outputs: type=image,name=ghcr.io/${{ github.repository }}/${{ matrix.dockerinfo.name }}:${{ steps.meta.outputs.version }},push-by-digest=true,name-canonical=true,push=true

- name: Export digest
run: |
Expand Down
Loading

0 comments on commit 6748ff6

Please sign in to comment.