Skip to content

Standardize upstream CLI reference syncing#24739

Open
dvdksn wants to merge 6 commits intodocker:mainfrom
dvdksn:rfc/sync-upstream-cli-v2
Open

Standardize upstream CLI reference syncing#24739
dvdksn wants to merge 6 commits intodocker:mainfrom
dvdksn:rfc/sync-upstream-cli-v2

Conversation

@dvdksn
Copy link
Copy Markdown
Contributor

@dvdksn dvdksn commented Apr 15, 2026

Standardize upstream CLI reference syncing

Supersedes #24736.

What this does

  1. Adds sync-upstream-cli.yml — a workflow that syncs CLI reference YAML from upstream repos into data/cli/. Runs daily (auto-detects new releases) or manually via workflow_dispatch. Uses bake git context to build upstream repos remotely — no cross-repo auth needed.

  2. Moves compose and model-runner CLI YAML out of Hugo modules — from _vendor/ to data/cli/compose/ and data/cli/model/, where the sync workflow manages them. Removes these modules from go.mod, go.sum, _vendor/modules.txt, and hugo.yaml.

How it works

For each configured upstream repo, the workflow:

  1. Checks for new releases via GitHub API
  2. Runs the repo's docs bake target via git context
  3. Copies generated YAML to data/cli/<folder>/
  4. Opens a PR

Tested locally against all three repos — output matches current vendored content.

Configured repos

Upstream repo Bake target Bake file Output path data/cli/ folder
docker/buildx update-docs root out/reference/*.yaml buildx
docker/compose docs-update root out/reference/*.yaml compose
docker/model-runner update-docs cmd/cli/docker-bake.hcl *.yaml model

What upstream repos need to do

Nothing for buildx, compose, and model-runner — uses their existing bake targets.

docker/cli: needs a bake target (currently uses make yamldocs). Tracked separately.

Follow-up work

  • Standardize bake target naming across repos (docs-release or similar)
  • Add docker/cli once it has a bake target
  • Retire sync-cli-docs.yml + hack/sync-cli-docs.sh
  • buildx can delete docs-release.yml and the fork dependency

Pull-based workflow that runs in docker/docs — no cross-repo auth needed.
Runs daily to auto-detect new releases, or manually via workflow_dispatch.

For each configured upstream repo, runs the `docs-release` bake target
via git context, copies YAML output to data/cli/<folder>/, and opens a PR.

Upstream contract: define a `docs-release` bake target that outputs
*.yaml CLI reference files.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@netlify
Copy link
Copy Markdown

netlify bot commented Apr 15, 2026

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit b1a264d
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/69df9eb83135c000089c5388
😎 Deploy Preview https://deploy-preview-24739--docsdocker.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

dvdksn and others added 2 commits April 15, 2026 16:01
Pull-based workflow that runs in docker/docs — no cross-repo auth needed.
Runs daily to auto-detect new releases, or manually via workflow_dispatch.

Uses existing upstream bake targets via git context:
- docker/buildx: `update-docs` target
- docker/compose: `docs-update` target
- docker/model-runner: `update-docs` target (cmd/cli/docker-bake.hcl)

Generates YAML, copies to data/cli/<folder>/, and opens a PR.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move CLI reference YAML for compose and model-runner from Hugo module
mounts (_vendor/) to data/cli/, where it will be managed by the
sync-upstream-cli workflow alongside buildx and engine.

- Copy YAML from _vendor/ to data/cli/compose/ and data/cli/model/
- Remove compose and model-runner imports from hugo.yaml
- Remove from go.mod, go.sum, and _vendor/modules.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@dvdksn dvdksn changed the title RFC v2: standardize upstream CLI reference syncing Standardize upstream CLI reference syncing Apr 15, 2026
dvdksn and others added 3 commits April 15, 2026 16:13
Replace JavaScript-based dynamic matrix with a static YAML matrix.
Version resolution is a simple `gh api` call in the sync job itself.
Dispatch filtering uses a job-level `if` condition.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaces manual git commit/push/gh-pr-create with a single action
that handles commit, branch, push, and PR create/update.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant