Commit Graph

69 Commits

Author SHA1 Message Date
Hongming Wang
47fcac2501 chore(ci): add auto-promote-staging workflow 2026-04-24 07:44:36 -07:00
Hongming Wang
d57b07dc2b
Merge pull request #5 from Molecule-AI/perf/publish-template-ubuntu-latest
perf: publish-template-image runs on ubuntu-latest (public caller repos)
2026-04-22 12:50:15 -07:00
Hongming Wang
09f0fbf9b0 perf(publish-template-image): move to ubuntu-latest for public-repo callers
All 8 template repos are public → GHA-hosted minutes are free, so
there's no cost incentive to stay on the self-hosted Mac mini. The
only reason we started there was to avoid GHA rate limits (memory
feedback_selfhosted_runner); that concern doesn't apply here because:

- Linux/amd64 builds go native on ubuntu-latest (no QEMU emulation
  from arm64 → amd64), so builds run ~2-3x faster.
- docker/login-action@v3 + GITHUB_TOKEN handles GHCR auth cleanly,
  no Keychain gymnastics needed.
- No queue wait when the Mac mini is busy publishing canvas/platform
  or running e2e.

Concretely this change:
- runs-on: [self-hosted, macos, arm64] → ubuntu-latest
- Drops the hand-rolled `auths` config step (macOS Keychain
  workaround) in favour of `docker/login-action@v3`.
- Drops `docker/setup-qemu-action` (unnecessary for a linux/amd64
  target on an amd64 runner).
- Uses setup-buildx@v3 to match the login-action major version.

Self-hosted Mac mini remains the runner for private-repo workflows
(follow-up PRs will migrate other public-repo workflows in
molecule-core).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 12:49:02 -07:00
Hongming Wang
b9f98a052f
Merge pull request #4 from Molecule-AI/feat/publish-template-image-workflow
feat(ci): reusable publish-template-image workflow
2026-04-22 12:10:59 -07:00
Hongming Wang
61bebd95cd feat(ci): reusable publish-template-image workflow for all template repos
Each Molecule-AI/molecule-ai-workspace-template-* repo currently has
no way to publish its Docker image. Tenants build locally via
workspace/rebuild-runtime-images.sh after a manual clone — which
means "merge template PR" and "template live on tenants" are two
separate manual steps per tenant.

This workflow is the `publish` half of that pipeline. Called from
each template repo via `uses: Molecule-AI/molecule-ci/.github/
workflows/publish-template-image.yml@main`, it:

- Derives runtime name from the caller repo (strip
  `molecule-ai-workspace-template-` prefix) so per-repo wrappers
  stay one-line.
- Builds linux/amd64 (self-hosted macOS arm64 runner + QEMU) and
  pushes to `ghcr.io/molecule-ai/workspace-template-<runtime>:latest`
  plus `:sha-<7>` for per-commit pinning.
- Uses the Keychain-avoiding GHCR auth pattern from canvas' publish
  workflow — osxkeychain write fails under the locked launchd keychain
  on the Mac mini runner; writing auths map directly works.
- Smoke-tests the pushed image by pulling and inspecting entrypoint.

Follow-up (not in this PR):
- Each template repo gets a ~10-line caller workflow.
- Monorepo provisioner.RuntimeImages map switches from bare
  `workspace-template:<runtime>` (local-only) to
  `ghcr.io/molecule-ai/workspace-template-<runtime>:latest`.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-22 12:10:37 -07:00
e538690198 fix(CI): embed Python secrets scanner inline in workflow, drop nested checkout 2026-04-21 11:13:28 +00:00
d67dd489b5 fix(CI): default molecule-ci checkout to main branch (not calling repo sha) 2026-04-21 11:11:13 +00:00
3c76e0b3b9 fix(CI): fetch molecule-ci scripts before running, add second checkout step 2026-04-21 11:10:41 +00:00
487056d7dd ci: add .molecule-ci/scripts/ directory with all CI scripts 2026-04-21 11:09:16 +00:00
molecule-ai[bot]
c9344eabeb
Merge pull request #3 from Molecule-AI/fix/secrets-check-python
fix(CI): replace grep secrets check with Python scanner
2026-04-21 11:06:30 +00:00
b96821c885 fix(CI): replace grep secrets check with Python scanner
The grep-based secrets check matched literal credential patterns in
documentation (e.g., "sk-ant-..." in CLAUDE.md examples), causing
false-positive CI failures.

Replace with a Python script that:
- Skips .molecule-ci/ directory entirely
- Uses context-aware matching (requires quotes or assignment context)
- Filters out documentation examples with "..." or <example> markers
- Handles all three reusable workflows (plugin, workspace-template, org-template)
2026-04-21 11:04:51 +00:00
molecule-ai[bot]
425e94d516
Merge pull request #2 from Molecule-AI/ci-improvements
ci: streamline workflows, add timeouts, and cache pip
2026-04-20 23:13:37 +00:00
Molecule AI Platform Engineer
a89b14a76c ci: streamline workflows, add timeouts, and cache pip
- Remove redundant nested checkout of molecule-ci in workflow_call jobs
- Add timeout-minutes to prevent hung jobs (plugin: 10m, workspace: 15m)
- Add pip cache using requirements.txt
- Add missing SKILL.md heading check in validate-plugin
- Add legacy import and runtime dependency warnings in workspace validation

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-20 04:54:35 +00:00
Hongming Wang
e2ffbae82b
Merge pull request #1 from Molecule-AI/chore/credentials-gitignore
chore: gitignore credentials
2026-04-16 09:24:48 -07:00
rabbitblood
90ce5aa8ee chore: gitignore credentials for molecule-ci
Adds standard credential gitignore (.env / *.pem / .secrets/ / .auth_token).
Per-CEO directive 2026-04-16: every plugin and template repo should
gitignore credentials so self-hosters can't accidentally commit real
tokens to public repos.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-16 09:18:35 -07:00
Hongming Wang
33202cb334 fix: skip non-dict entries from !include in org validator 2026-04-16 04:52:45 -07:00
Hongming Wang
647fa1f774 fix: handle !include YAML tags in org template validator 2026-04-16 04:51:34 -07:00
Hongming Wang
6533e6eeac fix: use standalone Python scripts instead of heredocs in workflows
Heredocs in GitHub Actions YAML were being echoed as script text
instead of executed. Moving validation logic to scripts/ and running
via 'python3 .molecule-ci/scripts/validate-*.py' after checking out
the molecule-ci repo at .molecule-ci/ path.
2026-04-16 04:49:28 -07:00
Hongming Wang
f035b6e108 feat: reusable CI workflows for plugin, workspace template, and org template validation
Three reusable GitHub Actions workflows:
- validate-plugin.yml: plugin.yaml schema, content check, secrets scan
- validate-workspace-template.yml: config.yaml, adapter, Dockerfile build, secrets
- validate-org-template.yml: org.yaml hierarchy, files_dir references, secrets

Usage: `uses: Molecule-AI/molecule-ci/.github/workflows/validate-*.yml@main`
2026-04-16 04:42:16 -07:00