Commit 155466d
authored
ci: add workflow_dispatch path to force-upload OpenAPI spec from main (#5647)
## Summary
- Adds a `force-upload` job in `stainless-builds.yml` that runs on
`workflow_dispatch` when `pr_number` is empty. It checks out `main` and
uses `upload-openapi-spec-action/build` to unconditionally push the
current OpenAPI spec and config to the Stainless project's `main`
branch.
- Makes the `pr_number` input optional (was `required: true`).
- Gates the existing PR pipeline (`compute-branch` and downstream
`preview` / `merge` / `run-integration-tests`) so it skips on the
force-upload path.
## Why
The `upload-openapi-spec-action/merge` action diffs base→head and skips
when the OAS/config files didn't change in the PR. After out-of-band
Stainless changes (e.g. the recent org/project rename in #5634), the
spec on Stainless can drift from what's in the repo with no way to
resync short of editing the spec file. This adds a manual lever to
re-push the current spec without faking a content change.
## Test plan
- [ ] After merge, run the workflow manually from the Actions tab with
no `pr_number`. Confirm the `force-upload` job runs, posts the spec to
`llamastack/llama-stack-client` on Stainless, and the other jobs are
skipped.
- [ ] Open a regular PR touching `client-sdks/stainless/**` and confirm
the existing preview/merge/integration-tests pipeline still runs as
before.1 parent bfdae03 commit 155466d
1 file changed
Lines changed: 29 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | | - | |
34 | | - | |
| 33 | + | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
68 | 94 | | |
| 95 | + | |
69 | 96 | | |
70 | 97 | | |
71 | 98 | | |
| |||
0 commit comments