|
| 1 | +--- |
| 2 | +status: done |
| 3 | +depends: [] |
| 4 | +specs: [] |
| 5 | +issues: [] |
| 6 | +pr: 135 |
| 7 | +--- |
| 8 | + |
| 9 | +# Plan: stand up develop→main Release-PR automation |
| 10 | + |
| 11 | +## Scope |
| 12 | + |
| 13 | +Adopt the Jarvus develop→main Release-PR flow so versioned releases are cut from |
| 14 | +a changelog'd PR, and the GHCR image build (currently manual) is automated on |
| 15 | +tag. Replaces the ad-hoc `docker build/push :sandbox` step for versioned |
| 16 | +releases. |
| 17 | + |
| 18 | +What ships: |
| 19 | + |
| 20 | +- **Four workflows** under `.github/workflows/`: |
| 21 | + - `release-prepare.yml` — push to `develop` opens/updates a `Release: vX.Y.Z` |
| 22 | + PR into `main` with a bot changelog (`GITHUB_TOKEN`). |
| 23 | + - `release-validate.yml` — validates that PR as it changes (`GITHUB_TOKEN`). |
| 24 | + - `release-publish.yml` — on merge of that PR, tags `vX.Y.Z` |
| 25 | + (`BOT_GITHUB_TOKEN`, required so the tag can trigger the next workflow). |
| 26 | + - `container-publish.yml` — on `v*` tag, builds + pushes |
| 27 | + `ghcr.io/codeforphilly/codeforphilly-ng:vX.Y.Z` and `:latest`. |
| 28 | +- **`ci.yml`** also runs on `develop`. |
| 29 | +- **`docs/operations/releases.md`** — operator guide for the flow. |
| 30 | +- A `develop` branch created off `main`. |
| 31 | + |
| 32 | +## Implements |
| 33 | + |
| 34 | +No spec — release/CI tooling. Uses the `JarvusInnovations/infra-components` |
| 35 | +release-* composite actions (unpinned `channels/.../latest`), matching the |
| 36 | +reference repo (`jarvus-data-pipeline`). |
| 37 | + |
| 38 | +## Approach |
| 39 | + |
| 40 | +Adapt the reference workflows to this repo: single image (no sub-image, no |
| 41 | +BigQuery), `actions/checkout@v6` + `docker/login-action@v3`, no `--platform` |
| 42 | +(CI runners + cluster are both amd64). `BOT_GITHUB_TOKEN` already set as a repo |
| 43 | +secret. First release will be seeded at **v0.1.0**. |
| 44 | + |
| 45 | +## Validation |
| 46 | + |
| 47 | +- [x] Four workflows + `ci.yml` (now on `develop`) + `docs/operations/releases.md` |
| 48 | + shipped; YAML parsed by GitHub Actions (the workflows ran on the PR). |
| 49 | +- [x] `release-validate` behaves as designed — it ran on PR #135 and failed with |
| 50 | + `PR title must match "Release: vX.Y.Z"`, confirming the guard works (only |
| 51 | + Release PRs may target `main`). Expected on this bootstrap feature-PR. |
| 52 | +- [ ] **Activation (post-merge, operator):** create `develop`; first push opens a |
| 53 | + `Release: v0.1.0` PR; merging it tags `v0.1.0` and `container-publish` |
| 54 | + pushes the image. Deferred — see Follow-ups. |
| 55 | + |
| 56 | +## Risks |
| 57 | + |
| 58 | +- `container-publish`'s first run fails if GHCR package write isn't granted or |
| 59 | + `BOT_GITHUB_TOKEN` is missing — non-destructive (tag created, push fails), |
| 60 | + fixable and re-runnable. |
| 61 | +- Branch protection on `main` is a GitHub-settings change (operator action). |
| 62 | + |
| 63 | +## Notes |
| 64 | + |
| 65 | +- `release-validate` runs on **every** PR into `main` and fails non-Release PRs |
| 66 | + by design — that's the guard enforcing "only Release PRs target `main`; feature |
| 67 | + work goes to `develop`." Do not be alarmed by its failure on this bootstrap PR. |
| 68 | + Consequently, if branch protection on `main` requires status checks, require |
| 69 | + **`build`** (CI); requiring `release-validate` too would additionally enforce |
| 70 | + the Release-PR-only rule. |
| 71 | +- The manual `:sandbox` build path still works for ad-hoc iteration; versioned |
| 72 | + releases now flow through `container-publish`. |
| 73 | + |
| 74 | +## Follow-ups |
| 75 | + |
| 76 | +- **Activation (operator):** after this merges to `main`, create `develop` off |
| 77 | + `main` and push it to open the first `Release: v0.1.0` PR. (I can do this on |
| 78 | + request — held back so the first release is opened deliberately.) |
| 79 | +- **Operator (GitHub settings):** confirm `BOT_GITHUB_TOKEN` secret; grant the |
| 80 | + repo's Actions `packages: write` on the GHCR package (first publish creates |
| 81 | + it); add branch protection on `main` (require `build`). |
| 82 | +- **Deferred:** wire the cluster/GitOps to track the published `:vX.Y.Z` / |
| 83 | + `:latest` tags instead of the manual `:sandbox` push. No issue filed yet — |
| 84 | + revisit when prod GitOps lands. |
0 commit comments