From 06d0c7e64afa5cdc9cb5e2da0066639d4b4dece3 Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Fri, 2 Aug 2024 11:50:18 +0200 Subject: [PATCH] GHA: Introduce concurrency.cancel-in-progress Some of the workflows do not consider `cancel-in-progress`. As mentioned in #576, it is not an optimal use of resources to keep running existing actions upon PR updates. This commit introduces the concurrency concept to them. Signed-off-by: Hyounggyu Choi --- .github/workflows/aa_cc_kbc.yml | 4 ++++ .github/workflows/aa_crypto.yml | 4 ++++ .github/workflows/aa_eaa_kbc.yml | 4 ++++ .github/workflows/aa_sample_keyprovider.yml | 4 ++++ .github/workflows/aa_sev_kbc.yml | 4 ++++ 5 files changed, 20 insertions(+) diff --git a/.github/workflows/aa_cc_kbc.yml b/.github/workflows/aa_cc_kbc.yml index 960d910ee..3078e0241 100644 --- a/.github/workflows/aa_cc_kbc.yml +++ b/.github/workflows/aa_cc_kbc.yml @@ -18,6 +18,10 @@ on: create: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: cc_kbc_ci: if: github.event_name != 'push' || github.event.pull_request.merged == false diff --git a/.github/workflows/aa_crypto.yml b/.github/workflows/aa_crypto.yml index 4bfa962b2..128886548 100644 --- a/.github/workflows/aa_crypto.yml +++ b/.github/workflows/aa_crypto.yml @@ -14,6 +14,10 @@ on: create: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: crypto_ci: if: github.event_name != 'push' || github.event.pull_request.merged == false diff --git a/.github/workflows/aa_eaa_kbc.yml b/.github/workflows/aa_eaa_kbc.yml index fd1f2ba8b..a33e3f88b 100644 --- a/.github/workflows/aa_eaa_kbc.yml +++ b/.github/workflows/aa_eaa_kbc.yml @@ -14,6 +14,10 @@ on: create: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: eaa_kbc_ci: if: github.event_name != 'push' || github.event.pull_request.merged == false diff --git a/.github/workflows/aa_sample_keyprovider.yml b/.github/workflows/aa_sample_keyprovider.yml index c746bbbe3..39473427e 100644 --- a/.github/workflows/aa_sample_keyprovider.yml +++ b/.github/workflows/aa_sample_keyprovider.yml @@ -13,6 +13,10 @@ on: create: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: coco_keyprovider_ci: if: github.event_name != 'push' || github.event.pull_request.merged == false diff --git a/.github/workflows/aa_sev_kbc.yml b/.github/workflows/aa_sev_kbc.yml index 1b2eb1da5..e155c8a30 100644 --- a/.github/workflows/aa_sev_kbc.yml +++ b/.github/workflows/aa_sev_kbc.yml @@ -13,6 +13,10 @@ on: create: workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: offline_sev_kbc_ci: if: github.event_name != 'push' || github.event.pull_request.merged == false