44# and that the committed generated code matches what the generation pipeline produces.
55#
66# Jobs:
7- # 1. validate: Runs the full generation pipeline in dry-run mode
7+ # 1. validate: Calls generate-command.yml with dry_run=true. The generation
8+ # workflow handles its own path filtering — it skips the Generate SDK job
9+ # when only non-generation files changed (e.g., dev dependency bumps).
810# 2. zero-diff: Checks for drift using the validate job's outputs (in-place git status).
911# If drift is detected, the check fails and posts a comment telling the author to run /generate.
1012#
1113# This workflow calls the main generation workflow with dry_run=true to ensure
1214# both workflows use the same generation logic.
13- #
14- # Note: paths-ignore is NOT used at the workflow level because GitHub treats a
15- # workflow that never runs as "expected" (pending), which blocks required checks.
16- # Instead, we filter paths at the job level so skipped jobs report as "skipped"
17- # (equivalent to "passed" for required checks).
1815
1916name : Test (Full)
2017
@@ -27,37 +24,17 @@ permissions:
2724 pull-requests : write
2825
2926jobs :
30- check-paths :
31- name : Check Changed Paths
32- runs-on : ubuntu-latest
33- steps :
34- - name : Checkout repository
35- uses : actions/checkout@v4
36- - name : Filter changed paths
37- uses : dorny/paths-filter@v4
38- id : filter
39- with :
40- filters : |
41- generation:
42- - '**'
43- - '!README.md'
44- - '!docs/**'
45- outputs :
46- should_run : ${{ github.event_name == 'workflow_dispatch' || steps.filter.outputs.generation == 'true' }}
47-
4827 validate :
4928 name : Validate Generation (Dry Run)
50- needs : check-paths
51- if : needs.check-paths.outputs.should_run == 'true'
5229 uses : ./.github/workflows/generate-command.yml
5330 with :
5431 dry_run : true
5532 secrets : inherit
5633
5734 zero-diff :
5835 name : Zero-Diff Check (Generated Code)
59- needs : [check-paths, validate]
60- if : needs.check-paths.outputs.should_run == 'true' && github.event_name == 'pull_request'
36+ needs : [validate]
37+ if : github.event_name == 'pull_request'
6138 runs-on : ubuntu-latest
6239 permissions :
6340 contents : read
0 commit comments