Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b2eade2

Browse files
authored
ci: limit push trigger to master to avoid duplicate runs on PRs (#200)
Several workflows listen to both push and pull_request with overlapping paths. When a PR head branch is pushed, GitHub fires both events, and the existing concurrency keys cannot deduplicate them: - build-check / build-envd-base-image group by github.ref, which differs between push (refs/heads/<branch>) and pull_request (refs/pull/N/merge); - build-builder-image declares no concurrency block at all; - hypervisor-integration explicitly includes ${{ github.event_name }} in the concurrency key, which makes both runs coexist by design. As a result, every check (Build CubeAPI, Build CubeMaster, ...) shows up twice in the PR checks list, doubling CI cost for no benefit. PR #195 and #196 are recent examples that triggered the duplicate runs on Build Check. Restrict the push trigger of the four affected workflows to the master branch. PR validation now runs only via the pull_request event; direct pushes to master remain covered. Signed-off-by: staryxchen <[email protected]>
1 parent a661176 commit b2eade2

4 files changed

Lines changed: 4 additions & 0 deletions

File tree

.github/workflows/build-builder-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build Builder Image
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- 'docker/Dockerfile.builder'
78
- '.github/workflows/build-builder-image.yml'

.github/workflows/build-check.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build Check
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- 'CubeAPI/**'
78
- 'CubeMaster/**'

.github/workflows/build-envd-base-image.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Build envd Base Image
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- 'docker/Dockerfile.cube-base'
78
- 'docker/cube-entrypoint.sh'

.github/workflows/hypervisor-integration.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ name: Hypervisor Tests (x86-64)
22

33
on:
44
push:
5+
branches: [master]
56
paths:
67
- 'hypervisor/**'
78
- '.github/workflows/hypervisor-integration.yaml'

0 commit comments

Comments
 (0)