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 08fcfad
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 10 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/as-docker-build.yml
Original file line number Diff line number Diff line change
@@ -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/**'
Expand All @@ -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
2 changes: 0 additions & 2 deletions .github/workflows/kbs-docker-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
name: KBS Container Image Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Expand Down

0 comments on commit 08fcfad

Please sign in to comment.