Repository navigation
Conversation
Adds a generator + workflow that rebuild the custom-role permissions reference from custom-role-metadata.yaml in docker/iam-services (the source of truth), replacing the manual updates done by hand. - scripts/generate-custom-role-permissions.mjs rewrites the tables between generation markers; frontmatter, intro, and "Next steps" are hand-maintained. - .github/workflows/sync-custom-role-permissions.yml regenerates the page and opens a PR when triggered by docker/iam-services. The regenerated page adds the Licensing and Cloud Sandboxes sections and the DHI "Manage customizations" row (from iam-services#1172 and docker#1173), superseding the manual docker#26324. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Could this follow the existing Hugo data/template approach? The CLI reference already renders structured data through The sync workflow could vendor the upstream YAML into For example, the Markdown rendering could look roughly like this, with the YAML stored at The page could invoke the shortcode between its introduction and next steps, with a corresponding HTML renderer. The workflow would only fetch the YAML and open a PR containing the data update, so builds wouldn't need access to the private upstream repository. Separately, the upstream metadata needs a description correction: “Manage organization access tokens” describes creating, updating, and deleting repositories, while Generated by Codex |
This was fixed in https://github.com/docker/iam-services/pull/1181 |
Replace the Node generator and generation markers with a data file and a custom-role-permissions shortcode, following the existing hugo.Data approach. The sync workflow now only vendors custom-role-metadata.yaml into data/custom_role_permissions.yaml. The shortcode renders the tables for both HTML and Markdown output and fails the build on missing names or descriptions. Exclude the Markdown-emitting shortcode from Prettier. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Take main's version of the page so the upcoming merge of main is conflict-free. The next commit swaps the tables for the shortcode. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…rtcode Replace the hand-maintained tables from main with the shortcode call. Keeps main's updated front matter and intro. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Summary
Replaces the manual edits we make to this page whenever a custom-role permission is added or renamed with a synced data file + Hugo shortcode. The source of truth is
custom-role-metadata.yamlindocker/iam-services.What's in this PR
data/custom_role_permissions.yaml: the upstream YAML, vendored verbatim from iam-servicesmain.layouts/_shortcodes/custom-role-permissions.htmland.markdown.md: render one section per group, with a Permission/Description table, for both HTML and Markdown output. Cells escape|. The build fails with the group and permission name if a group, name or description is missing. The page calls it as{{% custom-role-permissions %}}so the headings stay in the page table of contents.permissions-reference.md: the generated region is replaced by the shortcode call. Intro and "Next steps" stay hand-maintained..github/workflows/sync-custom-role-permissions.yml:workflow_dispatch(with arefinput) that fetches the YAML at that ref, writes it todata/, and opens a PR viapeter-evans/create-pull-request. Site builds never need access to the private upstream repo..prettierignore: excludes the shortcode, because it emits Markdown and Prettier's go-template plugin reflows the table.The Node generator, hand-rolled YAML parser and generation markers are removed.
How the automation fires
A companion workflow in
docker/iam-services(PR #1175) triggers this one whenevercustom-role-metadata.yamlchanges onmain. The result is always a PR for review, so nothing publishes automatically.Opt out of any given change: close the generated PR; it re-opens on the next source change.
Testing
Built the full site with Hugo 0.163.0. HTML and Markdown output both contain the same 32 permissions in 8 tables, the section anchors and table of contents are intact, and removing a description fails the build with a clear error. Prettier passes on the YAML and the workflow. The workflow itself has not run.
HUB_PLATFORM_APP_ID/HUB_PLATFORM_APP_PRIVATE_KEYsecrets present in this repo, with the GitHub App installed here (PR-write) and granted contents-read ondocker/iam-services. (Same app already used by iam-services ↔ frontends sync.)🤖 Generated with Claude Code