From 621375748ed24c5d9fca5e77bd879bfe651d0470 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 | 2 +- .github/workflows/kbs-docker-build.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/as-docker-build.yml b/.github/workflows/as-docker-build.yml index e8d7db3c5..7b523cb8b 100644 --- a/.github/workflows/as-docker-build.yml +++ b/.github/workflows/as-docker-build.yml @@ -16,6 +16,6 @@ on: jobs: check_as_image_build: - if: github.event_name == 'pull_request' || github.event_name == 'push' + if: 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..a89de427b 100644 --- a/.github/workflows/kbs-docker-build.yml +++ b/.github/workflows/kbs-docker-build.yml @@ -7,5 +7,6 @@ on: jobs: check_kbs_image_build: + if: github.event_name != 'push' uses: ./.github/workflows/build-kbs-image.yml secrets: inherit