Skip to content

Commit 9697dae

Browse files
authored
fix(ci): skip CI on draft PRs (#1423)
Added draft check to entry-point jobs (check-changes in docker.yml, pre-commit in code-cleanup.yml). All downstream jobs depend on these via `needs`, so everything skips when a PR is draft. Uses `github.event_name != 'pull_request' || github.event.pull_request.draft == false` to ensure push events (merges to main/dev) still trigger CI — only pull_request events check draft status.
1 parent 52427bf commit 9697dae

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/code-cleanup.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ permissions:
1010

1111
jobs:
1212
pre-commit:
13+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1314
runs-on: self-hosted
1415
steps:
1516
- name: Fix permissions

.github/workflows/docker.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ permissions:
1616

1717
jobs:
1818
check-changes:
19+
if: github.event_name != 'pull_request' || github.event.pull_request.draft == false
1920
runs-on: [self-hosted, Linux]
2021
outputs:
2122
ros: ${{ steps.filter.outputs.ros }}

0 commit comments

Comments
 (0)