|
2 | 2 | # --------------------------------------------------------------------------- |
3 | 3 | # Buf CI |
4 | 4 | # --------------------------------------------------------------------------- |
5 | | -# 1. validate -> lint + breaking checks (runs on both push & pull_request) |
| 5 | +# 1. validate -> lint + breaking checks (runs on push, merge_group, & pull_request) |
6 | 6 | # 2. push-to-registry -> push to Buf registry only (runs after validation passes) |
7 | 7 | # 3. archive-label -> archive label in registry when branch/tag deleted (with error handling) |
8 | 8 | # --------------------------------------------------------------------------- |
|
29 | 29 | - '**/buf.lock' |
30 | 30 | - '.github/workflows/buf.yml' |
31 | 31 | delete: |
| 32 | + merge_group: |
| 33 | + types: [checks_requested] |
32 | 34 | permissions: |
33 | 35 | contents: read # checkout + annotations |
34 | 36 | pull-requests: write # inline lint / breaking comments |
35 | 37 | id-token: write # OIDC to assume AWS role (push job) |
36 | 38 | # =========================================================================== |
37 | | -# Job: validate (both push and pull_request - comprehensive validation) |
| 39 | +# Job: validate (push, merge_group, and pull_request - comprehensive validation) |
38 | 40 | # =========================================================================== |
39 | 41 | jobs: |
40 | 42 | validate: |
41 | | - if: github.event_name == 'push' || github.event_name == 'pull_request' |
| 43 | + if: github.event_name == 'push' || github.event_name == 'merge_group' || github.event_name == 'pull_request' |
42 | 44 | runs-on: ubuntu-latest |
43 | 45 | steps: |
44 | 46 | - uses: actions/checkout@v4 |
|
48 | 50 | paths: proto |
49 | 51 | lint: true |
50 | 52 | format: false # We use clang-tidy |
51 | | - breaking: false # flip to true when we have a release |
| 53 | + breaking: false # flip to true when we have a release |
52 | 54 | push: false # Only validate, don't push to registry |
53 | 55 | # =========================================================================== |
54 | 56 | # Job: push-to-registry (push events only - registry operations only) |
|
0 commit comments