diff --git a/.cursor/rules/convex-env.mdc b/.cursor/rules/convex-env.mdc index 3d53df3..3141b27 100644 --- a/.cursor/rules/convex-env.mdc +++ b/.cursor/rules/convex-env.mdc @@ -25,7 +25,7 @@ These names are configured in the Convex dashboard for this project. **Do not pu ## CI / GitHub integration - `GITHUB_TOKEN` — GitHub API (repo scans, branches, dispatching `custom_build*.yml`) -- `CONVEX_ENV` — e.g. `dev` selects `custom_build_test.yml` for workflow dispatch +- `CONVEX_ENV` — when `dev`, workflow dispatch uses **`custom_build_test.yml`** on git ref **`v2`** on `MeshEnvy/mesh-forge`; otherwise **`custom_build.yml`** on **`main`** - `CONVEX_BUILD_TOKEN` — shared with GitHub Actions secret of the same name; bearer auth for `POST /ingest-repo-build` ## R2 (firmware artifacts / signed downloads) diff --git a/convex/actions.ts b/convex/actions.ts index 742e18f..76dde47 100644 --- a/convex/actions.ts +++ b/convex/actions.ts @@ -24,9 +24,10 @@ export const dispatchRepoBuild = action({ const isDev = process.env.CONVEX_ENV === "dev" const workflowFile = isDev ? "custom_build_test.yml" : "custom_build.yml" + const workflowRef = isDev ? "v2" : "main" const payload = { - ref: "main", + ref: workflowRef, inputs: { owner: doc.owner, repo: doc.repo,