From 08fcfad6858be76d567f6a17f22cd20a963994ce Mon Sep 17 00:00:00 2001 From: Hyounggyu Choi Date: Fri, 15 Nov 2024 14:51:34 +0100 Subject: [PATCH] gha: Skip image build check on merge The following workflows are triggered twice during a merge: - build-kbs-image.yml - build-as-image.yml For self-hosted runners, which often have a limited number of available runners, this duplicate build is unnecessary and may cause CI bottlenecks. This commit ensures the workflow of interest is skipped when `github.event_name` is `push`', which occurs during a merge. Signed-off-by: Hyounggyu Choi --- .github/workflows/as-docker-build.yml | 8 -------- .github/workflows/kbs-docker-build.yml | 2 -- 2 files changed, 10 deletions(-) diff --git a/.github/workflows/as-docker-build.yml b/.github/workflows/as-docker-build.yml index e8d7db3c5..b6cc59692 100644 --- a/.github/workflows/as-docker-build.yml +++ b/.github/workflows/as-docker-build.yml @@ -1,12 +1,5 @@ name: AS/RVPS Container Image Build on: - push: - branches: - - "main" - paths: - - 'attestation-service/**' - - '.github/workflows/as-docker-build.yml' - - 'Cargo.toml' pull_request: paths: - 'attestation-service/**' @@ -16,6 +9,5 @@ on: jobs: check_as_image_build: - if: github.event_name == 'pull_request' || github.event_name == 'push' uses: ./.github/workflows/build-as-image.yml secrets: inherit diff --git a/.github/workflows/kbs-docker-build.yml b/.github/workflows/kbs-docker-build.yml index f979b788f..f8e64aa08 100644 --- a/.github/workflows/kbs-docker-build.yml +++ b/.github/workflows/kbs-docker-build.yml @@ -1,7 +1,5 @@ name: KBS Container Image Build on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ]