|
1 | 1 | name: "SDK Canary (runtime compat gate)" |
2 | 2 |
|
3 | | -# Canary compatibility gate: installs an explicit version of the @github/copilot |
4 | | -# runtime, builds the Node SDK, and runs the Node e2e suite against it to prove |
5 | | -# runtime <-> SDK compatibility. On a green gate it publishes an SDK canary |
6 | | -# (pinned to the exact tested runtime) to the internal copilot-canary-test feed. |
7 | | -# Triggered manually via workflow_dispatch. |
| 3 | +# Nightly-style canary compatibility gate: installs an explicit version of the |
| 4 | +# @github/copilot runtime, builds the Node SDK, and runs the Node e2e suite |
| 5 | +# against it. This proves runtime <-> SDK compatibility. No publishing happens |
| 6 | +# here. |
8 | 7 |
|
9 | 8 | env: |
10 | 9 | HUSKY: 0 |
|
29 | 28 | required: false |
30 | 29 | type: boolean |
31 | 30 | default: false |
| 31 | + # TEMPORARY: branch-push trigger so we can validate the pipeline before the |
| 32 | + # workflow_dispatch entrypoint exists on main. Push events carry no dispatch |
| 33 | + # inputs, so the resolve job falls back to the currently pinned runtime from |
| 34 | + # public npm. Remove this trigger once the workflow lands on main. |
| 35 | + push: # TEMP: remove at finalize (coupled with the publish.if `event==push` clause) |
| 36 | + branches: [mackinnonbuck-sdk-canary-compat-gate] |
32 | 37 |
|
33 | 38 | permissions: |
34 | 39 | contents: read |
|
45 | 50 | steps: |
46 | 51 | - uses: actions/checkout@v6.0.2 |
47 | 52 |
|
48 | | - # Normalize the dispatch inputs into a single (RUNTIME_VERSION, |
| 53 | + # Normalize whichever trigger fired into a single (RUNTIME_VERSION, |
49 | 54 | # RUNTIME_SOURCE) pair that every downstream step references. Adding a |
50 | 55 | # `repository_dispatch: types: [runtime-canary]` trigger later is purely |
51 | 56 | # additive: add one more case that reads client_payload and defaults |
|
63 | 68 | VERSION="$INPUT_VERSION" |
64 | 69 | SOURCE="$INPUT_SOURCE" |
65 | 70 | ;; |
| 71 | + push) |
| 72 | + # No dispatch inputs on push: fall back to the currently pinned |
| 73 | + # runtime from public npm so the run is self-consistent and a green |
| 74 | + # result proves the pipeline mechanics. |
| 75 | + SOURCE="public" |
| 76 | + VERSION="$(node -e "const v=require('./nodejs/package.json').dependencies['@github/copilot']; process.stdout.write(String(v).replace(/^[\^~]/, ''))")" |
| 77 | + ;; |
66 | 78 | *) |
67 | 79 | echo "::error::Unsupported event '$EVENT_NAME'." |
68 | 80 | exit 1 |
@@ -190,17 +202,23 @@ jobs: |
190 | 202 | publish: |
191 | 203 | name: "Publish SDK canary (internal feed)" |
192 | 204 | needs: [resolve, test] |
193 | | - # Normally publish only runs when the e2e gate is green. One bypass: |
194 | | - # workflow_dispatch with force_publish=true — a human-acknowledged flake |
195 | | - # override, audited via the ::warning:: step below and the run's actor. |
| 205 | + # Normally publish only runs when the e2e gate is green. Two bypasses: |
| 206 | + # - workflow_dispatch with force_publish=true: a human-acknowledged flake |
| 207 | + # override (audited via the actor on the run). |
| 208 | + # - github.event_name == 'push': TEMP: remove at finalize — branch-validation |
| 209 | + # bypass coupled with the temporary push trigger so we can exercise the |
| 210 | + # publish + bypass paths on this branch. Drop the `github.event_name == |
| 211 | + # 'push'` clause from the `if:` below together with the push trigger; after |
| 212 | + # that, force is honored only on real dispatches. |
196 | 213 | # The bypass only skips the e2e *signal* — the publish job still runs the |
197 | 214 | # build (so a broken build can't publish) and enforces feed-only + read-back. |
198 | 215 | if: > |
199 | 216 | !cancelled() && |
200 | 217 | github.event.repository.fork == false && |
201 | 218 | needs.resolve.result == 'success' && |
202 | 219 | (needs.test.result == 'success' || |
203 | | - (github.event_name == 'workflow_dispatch' && inputs.force_publish)) |
| 220 | + (github.event_name == 'workflow_dispatch' && inputs.force_publish) || |
| 221 | + github.event_name == 'push') |
204 | 222 | environment: cicd |
205 | 223 | runs-on: ubuntu-latest |
206 | 224 | permissions: |
|
0 commit comments