Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gha: Skip duplicate image build on merge #581

Conversation

BbolroC
Copy link
Member

@BbolroC BbolroC commented Nov 15, 2024

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 PR 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]

@BbolroC BbolroC requested a review from a team as a code owner November 15, 2024 14:00
@BbolroC BbolroC changed the title gha: Skip image build check on merge gha: Skip duplicate image build check on merge Nov 15, 2024
@BbolroC BbolroC changed the title gha: Skip duplicate image build check on merge gha: Skip duplicate image build on merge Nov 15, 2024
.github/workflows/as-docker-build.yml Outdated Show resolved Hide resolved
.github/workflows/kbs-docker-build.yml Outdated Show resolved Hide resolved
@BbolroC BbolroC force-pushed the skip-duplicated-image-build-on-merge branch from 6213757 to 08fcfad Compare November 15, 2024 14:29
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]>
@BbolroC BbolroC force-pushed the skip-duplicated-image-build-on-merge branch from 08fcfad to 75eb9f7 Compare November 15, 2024 14:49
Copy link
Member

@fitzthum fitzthum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@fitzthum fitzthum merged commit b8a33ec into confidential-containers:main Nov 15, 2024
24 checks passed
@BbolroC BbolroC deleted the skip-duplicated-image-build-on-merge branch November 15, 2024 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants