-
Notifications
You must be signed in to change notification settings - Fork 8.1k
ci: Add automated CLI documentation sync workflow #23867
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
9d2c000 to
5ef3605
Compare
.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 |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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>4a2dcf3 to
bc3d914
Compare
1db1bda to
53548f1
Compare
|
The latest release needs to include docker/cli#6716 |
53548f1 to
1f51e28
Compare
| # TODO(vvoland): Remove this after 29.2.0 is released | ||
| VERSION=60f06cb2df3df36ddfb531c1dae8c6fa96e5f9e7 |
There was a problem hiding this comment.
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
1f51e28 to
6ad9f95
Compare
e902fc6 to
2fe3c49
Compare
2fe3c49 to
1e643d9
Compare
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>
1e643d9 to
c365245
Compare
|
Should be good now! |
| run: | | ||
| git push -u origin "${{ steps.create-branch.outputs.branch_name }}" | ||
| gh pr create \ |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directly in the upstream:
docs/.github/workflows/sync-cli-docs.yml
Line 55 in c365245
| BRANCH_NAME="bot/sync-cli-docs-$(date +%Y%m%d-%H%M%S)" |
Not ideal but... works
There was a problem hiding this comment.
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 😅
dvdksn
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks @vvoland
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