Skip to content

ci: Add automated CLI documentation sync workflow#23867

Merged
dvdksn merged 1 commit intodocker:mainfrom
vvoland:bot-update-cli-docs
Dec 19, 2025
Merged

ci: Add automated CLI documentation sync workflow#23867
dvdksn merged 1 commit intodocker:mainfrom
vvoland:bot-update-cli-docs

Conversation

@vvoland
Copy link
Copy Markdown
Contributor

@vvoland vvoland commented Dec 18, 2025

This adds a GitHub Actions workflow and supporting script to automatically sync CLI documentation from the docker/cli repository on a daily schedule.

Description

Related issues or tickets

Reviews

  • Technical review
  • Editorial review
  • Product review

@vvoland vvoland self-assigned this Dec 18, 2025
@netlify
Copy link
Copy Markdown

netlify Bot commented Dec 18, 2025

Deploy Preview for docsdocker ready!

Name Link
🔨 Latest commit c365245
🔍 Latest deploy log https://app.netlify.com/projects/docsdocker/deploys/694462688a971000084f106b
😎 Deploy Preview https://deploy-preview-23867--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.

@github-actions github-actions Bot added area/release Relates to CI or deployment ci ci updates labels Dec 18, 2025
@vvoland vvoland mentioned this pull request Dec 18, 2025
3 tasks
@vvoland vvoland force-pushed the bot-update-cli-docs branch from 9d2c000 to 5ef3605 Compare December 18, 2025 15:14
@vvoland vvoland requested a review from dvdksn December 18, 2025 15:14
Comment thread .github/workflows/sync-cli-docs.yml Outdated
name: Run sync script
id: sync
run: |
if ./hack/sync-cli-docs.sh cli-source origin/master; then
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We do not vendor the CLI docs from master - we vendor a tag or release branch (there might be exceptions to this rule but in general). Maybe we could leverage the docker_ce_version config, and use the release branch?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes, I was wondering that as well; we should probably pick the version we vendor (which should be a tagged version)?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to pick the one from hugo.yaml

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a follow-up, we should look at having a Dockerfile target that we can build from; that way we don't have to clone the git repository, but instead can just do something like;

docker build --target=yamldocs --output=./<destination> https://github.com/docker/cli#<git ref>

@vvoland vvoland force-pushed the bot-update-cli-docs branch 5 times, most recently from 4a2dcf3 to bc3d914 Compare December 18, 2025 16:34
@vvoland vvoland force-pushed the bot-update-cli-docs branch 6 times, most recently from 1db1bda to 53548f1 Compare December 18, 2025 17:03
@vvoland
Copy link
Copy Markdown
Contributor Author

vvoland commented Dec 18, 2025

The latest release needs to include docker/cli#6716

@vvoland vvoland force-pushed the bot-update-cli-docs branch from 53548f1 to 1f51e28 Compare December 18, 2025 17:06
Comment on lines +37 to +38
# TODO(vvoland): Remove this after 29.2.0 is released
VERSION=60f06cb2df3df36ddfb531c1dae8c6fa96e5f9e7
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gonna remove this after docker/cli#6716 is included in the latest version

@vvoland vvoland force-pushed the bot-update-cli-docs branch from 1f51e28 to 6ad9f95 Compare December 18, 2025 17:09
@vvoland vvoland requested review from dvdksn and thaJeztah December 18, 2025 18:46
@vvoland vvoland force-pushed the bot-update-cli-docs branch 4 times, most recently from e902fc6 to 2fe3c49 Compare December 18, 2025 19:20
@vvoland vvoland force-pushed the bot-update-cli-docs branch from 2fe3c49 to 1e643d9 Compare December 18, 2025 20:16
This adds a GitHub Actions workflow and supporting script to
automatically sync CLI documentation from the docker/cli repository on a
daily schedule.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
@vvoland vvoland force-pushed the bot-update-cli-docs branch from 1e643d9 to c365245 Compare December 18, 2025 20:21
@vvoland
Copy link
Copy Markdown
Contributor Author

vvoland commented Dec 18, 2025

Should be good now!

Comment on lines +94 to +96
run: |
git push -u origin "${{ steps.create-branch.outputs.branch_name }}"
gh pr create \
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious; where does it create the branch? Is that in a separate repository or directly here in the upstream?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Directly in the upstream:

BRANCH_NAME="bot/sync-cli-docs-$(date +%Y%m%d-%H%M%S)"

Not ideal but... works

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And this repo already uses dependabot so 😅

Copy link
Copy Markdown
Contributor

@dvdksn dvdksn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks @vvoland

@dvdksn dvdksn merged commit 57d0abd into docker:main Dec 19, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/release Relates to CI or deployment ci ci updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants