You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Bundles the work from #7 and #8 into a single commit so trunk lands
release-ready in one merge.
CI / build
- Migrate biome.json to the Biome 2.x schema (`files.includes` with
negation patterns, `overrides[*].includes`,
`assist.actions.source.organizeImports`).
- Reorder a stale import in src/deploy.ts that the v2 organizer flagged.
- Pin @actions/core to ^1.11.1 — 3.x is ESM-only and breaks the current
CJS bundle. Add a Dependabot ignore for major bumps until the project
is migrated to ESM.
Action UX
- `tags` input now accepts a YAML block mapping (the canonical workflow
form) or a JSON object string, instead of the prior multi-line
KEY=VALUE format. Tag keys still merge into the app's existing tags
on every run.
- Update action.yml description, README, and example workflows to the
new tag form.
Docs
- Correct the GitHub slug from `spiceai/spice-cloud-deploy-action` to
`spicehq/spice-cloud-deploy-action` everywhere it appeared (README
badges + examples, package.json metadata, examples/), so a copy/pasted
`uses:` line resolves to the published action at v1.
- Replace the duplicated tail-of-document "Required scopes" table with a
single "Scope cheat sheet" right under the OAuth client setup steps,
including an "All-in (recommended for a single CI client)" row that
spells out exactly which scopes to grant.
Tests
- New `parseTags` cases cover the YAML form, JSON form, quoted values,
duplicates, and validation errors.
- Total: 70 unit tests, all green.
3. **Grant the scopes you need** (see the table below). The action will fail with `403 Forbidden` if a required scope is missing.
54
53
4. Copy the **client ID** and **client secret** — the secret is shown only once.
55
54
5. In your GitHub repo (or org), add two secrets: `SPICE_CLIENT_ID`and `SPICE_CLIENT_SECRET`.
56
55
57
56
The action exchanges the client credentials at `https://spice.ai/api/oauth/token` for a short-lived bearer token (cached for the run).
58
57
58
+
### Scope cheat sheet
59
+
60
+
Grant exactly the scopes for the features you use. The "All-in" row at the bottom is what you'd typically pick for a CI client that does everything this action supports.
61
+
62
+
| Use this action to… | Required scopes |
63
+
| --- | --- |
64
+
| Resolve an existing app and trigger a deployment | `apps:read`, `deployments:read`, `deployments:write` |
65
+
| Create the app on first run (`create-app-if-missing: true`) | + `apps:write` |
66
+
| Push a `spicepod.yaml` manifest to the app before deploying | + `apps:write` |
67
+
| Set or merge app `tags` | + `apps:write` |
68
+
| Upsert app `secrets` before deploying | + `secrets:write` |
69
+
| Run runtime smoke tests (`test-sql`, `test-nsql`, etc.) | _no extra scope_ — uses `apps:read`, already required |
70
+
| **All-in (recommended for a single CI client)** | **`apps:read` `apps:write` `deployments:read` `deployments:write` `secrets:write`** |
71
+
72
+
> Avoid the `*` wildcard scope in production — it grants `apps:delete`, `secrets:read` (decrypted via the portal), and `members:*`, which this action never needs.
73
+
59
74
## Inputs
60
75
61
76
| Input | Required | Default | Description |
@@ -67,7 +82,7 @@ The action exchanges the client credentials at `https://spice.ai/api/oauth/token
67
82
| `create-app-if-missing` | no | `false` | Create the app if it doesn't exist (requires `app-name` and `region`). |
68
83
| `region` | conditional | — | Spice Cloud region (e.g. `us-east-1`, `us-west-2`). Required for new apps. |
69
84
| `visibility` | no | `private` | `public` or `private` — only used on app creation. |
70
-
| `tags` | no | — | Multi-line `KEY=VALUE` pairs. Merged into existing app tags. |
85
+
| `tags` | no | — | YAML or JSON map of tag key/value pairs. Merged into existing app tags. |
71
86
| `spicepod` | no | `spicepod.yaml` | Path to the Spicepod manifest. Pushed to the app before deploy when present. |
72
87
| `working-directory` | no | `.` | Working directory used to resolve relative paths. |
73
88
| `image-tag` | no | — | Override the runtime image tag (e.g. `1.5.0-models`). |
@@ -113,7 +128,7 @@ The action exchanges the client credentials at `https://spice.ai/api/oauth/token
113
128
### Bootstrap an app on first run
114
129
115
130
```yaml
116
-
- uses: spiceai/spice-cloud-deploy-action@v1
131
+
- uses: spicehq/spice-cloud-deploy-action@v1
117
132
with:
118
133
client-id: ${{ secrets.SPICE_CLIENT_ID }}
119
134
client-secret: ${{ secrets.SPICE_CLIENT_SECRET }}
@@ -122,15 +137,17 @@ The action exchanges the client credentials at `https://spice.ai/api/oauth/token
122
137
create-app-if-missing: true
123
138
visibility: private
124
139
tags: |
125
-
environment=production
126
-
team=data-platform
127
-
commit=${{ github.sha }}
140
+
environment: production
141
+
team: data-platform
142
+
commit: ${{ github.sha }}
128
143
```
129
144
145
+
> `tags` accepts either a YAML block mapping (shown above) or a JSON object string (e.g. `tags: '{"environment":"production","team":"data-platform"}'`). Tags are merged into the app's existing tags on every run.
146
+
130
147
### Upsert app secrets and run a SQL smoke test
131
148
132
149
```yaml
133
-
- uses: spiceai/spice-cloud-deploy-action@v1
150
+
- uses: spicehq/spice-cloud-deploy-action@v1
134
151
with:
135
152
client-id: ${{ secrets.SPICE_CLIENT_ID }}
136
153
client-secret: ${{ secrets.SPICE_CLIENT_SECRET }}
@@ -144,7 +161,7 @@ The action exchanges the client credentials at `https://spice.ai/api/oauth/token
144
161
### Verify chat, search, and MCP after a successful deploy
145
162
146
163
```yaml
147
-
- uses: spiceai/spice-cloud-deploy-action@v1
164
+
- uses: spicehq/spice-cloud-deploy-action@v1
148
165
with:
149
166
client-id: ${{ secrets.SPICE_CLIENT_ID }}
150
167
client-secret: ${{ secrets.SPICE_CLIENT_SECRET }}
@@ -170,7 +187,7 @@ jobs:
170
187
runs-on: ubuntu-latest
171
188
steps:
172
189
- uses: actions/checkout@v4
173
-
- uses: spiceai/spice-cloud-deploy-action@v1
190
+
- uses: spicehq/spice-cloud-deploy-action@v1
174
191
with:
175
192
client-id: ${{ secrets.SPICE_CLIENT_ID }}
176
193
client-secret: ${{ secrets.SPICE_CLIENT_SECRET }}
@@ -184,7 +201,7 @@ jobs:
184
201
185
202
```yaml
186
203
- id: deploy
187
-
uses: spiceai/spice-cloud-deploy-action@v1
204
+
uses: spicehq/spice-cloud-deploy-action@v1
188
205
with:
189
206
client-id: ${{ secrets.SPICE_CLIENT_ID }}
190
207
client-secret: ${{ secrets.SPICE_CLIENT_SECRET }}
@@ -210,22 +227,14 @@ jobs:
210
227
2.**Resolve or create the app.** If `app-id` is given, it's fetched directly. Otherwise the action looks up `app-name` via `GET /v1/apps`. With `create-app-if-missing: true`, a missing app is created in the requested `region`.
211
228
3.**Sync metadata.** Tags from the `tags` input are merged into the app's existing tags via `PUT /v1/apps/{id}`.
212
229
4.**Push the Spicepod.** When `spicepod.yaml` exists at `working-directory`, its contents are pushed to the app via `PUT /v1/apps/{id}` (`spicepod` field).
213
-
5.**Upsert secrets.** Each `KEY=VALUE` line is sent to `POST /v1/apps/{id}/secrets` (upsert).
230
+
5.**Upsert secrets.** Each `KEY=VALUE` line in `secrets`is sent to `POST /v1/apps/{id}/secrets` (upsert).
214
231
6.**Trigger the deployment.**`POST /v1/apps/{id}/deployments` with `branch`, `commit_sha`, `commit_message`, plus any `image-tag`/`channel`/`replicas` overrides.
215
232
7.**Poll until terminal.**`GET /v1/apps/{id}/deployments` is polled every `poll-interval-seconds` up to `timeout-seconds`.
216
233
8.**Smoke-test.** When the deployment succeeds, the action fetches the app's primary API key, instantiates a [`SpiceClient`](https://www.npmjs.com/package/@spiceai/spice) against the regional runtime URL (`https://<region>-prod-aws-data.spiceai.io`), waits for `isSpiceReady()`, and runs each configured probe.
217
234
218
235
The Action job step summary records the deployment metadata and a per-probe pass/fail table.
219
236
220
-
## Required scopes
221
-
222
-
| Action behavior | Minimum scopes |
223
-
| --- | --- |
224
-
| Resolve an app and trigger a deployment |`apps:read`, `deployments:read`, `deployments:write`|
225
-
| Create the app on first run | + `apps:write`|
226
-
| Push `spicepod.yaml` to the app | + `apps:write`|
227
-
| Upsert app secrets | + `secrets:write`|
228
-
| Run smoke tests (read API key) | + `apps:read` (already required) |
237
+
> Wondering which scopes to grant the OAuth client? See the [Scope cheat sheet](#scope-cheat-sheet) above.
0 commit comments