Skip to content

Commit

Permalink
gha: Skip image build check on merge
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
BbolroC committed Nov 15, 2024
1 parent 1afe92c commit 6213757
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/as-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
1 change: 1 addition & 0 deletions .github/workflows/kbs-docker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@ on:

jobs:
check_kbs_image_build:
if: github.event_name != 'push'
uses: ./.github/workflows/build-kbs-image.yml
secrets: inherit

0 comments on commit 6213757

Please sign in to comment.