Skip to content

ci: Add automated CLI documentation sync workflow - #23867

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

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

Conversation

@vvoland

Copy link
Copy Markdown
Contributor

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

@vvolandvvoland self-assigned this Dec 18, 2025
@netlify

netlifyBot commented Dec 18, 2025

Copy link
Copy Markdown

Deploy Preview for docsdocker ready!

NameLink
🔨 Latest commitc365245
🔍 Latest deploy loghttps://app.netlify.com/projects/docsdocker/deploys/694462688a971000084f106b
😎 Deploy Previewhttps://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-actionsgithub-actionsBot added area/release Relates to CI or deployment ci ci updates labels Dec 18, 2025
@vvolandvvoland mentioned this pull request Dec 18, 2025
3 tasks
@vvoland
vvoland requested a review from dvdksnDecember 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
ContributorAuthor

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
vvolandforce-pushed the bot-update-cli-docs branch 5 times, most recently from 4a2dcf3 to bc3d914CompareDecember 18, 2025 16:34
@vvoland
vvolandforce-pushed the bot-update-cli-docs branch 6 times, most recently from 1db1bda to 53548f1CompareDecember 18, 2025 17:03
@vvoland

Copy link
Copy Markdown
ContributorAuthor

The latest release needs to include docker/cli#6716

Comment on lines +37 to +38
# TODO(vvoland): Remove this after 29.2.0 is released
VERSION=60f06cb2df3df36ddfb531c1dae8c6fa96e5f9e7

Copy link
Copy Markdown
ContributorAuthor

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
vvolandforce-pushed the bot-update-cli-docs branch 4 times, most recently from e902fc6 to 2fe3c49CompareDecember 18, 2025 19:20
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

Copy link
Copy Markdown
ContributorAuthor

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
ContributorAuthor

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
ContributorAuthor

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 😅

@dvdksndvdksn left a comment

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.

LGTM! Thanks @vvoland

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

Labels

area/releaseRelates to CI or deploymentcici updates

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@vvoland@thaJeztah@dvdksn