RFC: standardize upstream CLI reference syncing#24736
Closed
dvdksn wants to merge 3 commits intodocker:mainfrom
Closed
RFC: standardize upstream CLI reference syncing#24736dvdksn wants to merge 3 commits intodocker:mainfrom
dvdksn wants to merge 3 commits intodocker:mainfrom
Conversation
Adds a generic reusable workflow that upstream repos can call to push CLI reference YAML to data/cli/<tool>/ and open a PR. This is an RFC — see the PR description for full context on the motivation and migration plan. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Use `data-files-folder` and `data-files-id` to match the existing validate-upstream workflow, so upstream repos can share the generate step and swap validate/sync based on trigger. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The calling workflow mints a short-lived token via actions/create-github-app-token and passes it as a plain secret. This avoids needing App credentials inside the reusable workflow. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
4 tasks
Contributor
Author
|
Superseded by #24739 — flipped from push model (workflow_call from upstream) to pull model (docker/docs pulls via bake git context). No cross-repo auth needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC: standardize how upstream repos sync CLI reference docs
This PR proposes a generic reusable workflow that upstream repos can call to push CLI reference YAML to
data/cli/<folder>/and open a PR. The goal is to replace the current patchwork of import mechanisms with a single, consistent pattern.Problem
We currently have 4 different mechanisms for getting CLI reference YAML into
data/cli/:_vendor/sync-cli-docs.sh) that clones + builds docker/cliProposed solution
One reusable workflow (
sync-upstream-cli.yml) that shares input names with the existingvalidate-upstream.yml, so upstream repos get a consistent interface.Auth: A dedicated GitHub App (
docker-docs-sync) installed on docker/docs withcontents:write+pull-requests:write. App credentials stored as org secrets, accessible to upstream repos. The calling workflow mints a short-lived token and passes it as a plain secret — the reusable workflow just receives a token string.Example caller (e.g.,
docs-release.ymlin an upstream repo):The
data-files-idanddata-files-folderinputs are shared between both workflows. The only differences:module-name(for Hugo module replacement of markdown content)version+token(for commit metadata and write access)The sync workflow:
data/cli/<folder>/*.yaml(clear + copy, so deletions are reflected)Migration plan
Adoption is incremental — each upstream migrates when ready:
docs-release.ymldocs-release.ymlwith sync call, remove mount fromhugo.yamlsync-cli-docs.sh)docs-release.ymltriggered on tag push, retire cron + scriptWhat this does NOT change
validate-upstream.ymlstays — it validates upstream PRs before merge. This new workflow syncs after release. They're complementary._content.gotmplcontent adapter stays — it already generates CLI pages from whatever YAML is indata/cli/.Cleanup opportunities
validate-upstream.ymlstill has acreate-placeholder-stubsinput that is no longer needed since the content adapter generates pages dynamically. Can be removed in a follow-up.sync-cli-docs.ymlandhack/sync-cli-docs.shcan be retired.Setup
docker-docs-sync) in the Docker org withcontents:write+pull-requests:writedocker/docsDOCS_SYNC_APP_ID) and private key as org secret (DOCS_SYNC_APP_PRIVATE_KEY), accessible to upstream reposThis is an RFC — feedback welcome before we start migrating upstream repos.