-
Notifications
You must be signed in to change notification settings - Fork 8.1k
ci: fix validate upstream workflow #19467
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
ci: fix validate upstream workflow #19467
Conversation
✅ Deploy Preview for docsdocker ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
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.
cc @crazy-max didn't we have a dummy repo somewhere where we could dry-run this? Or should we do it on a buildx fork/branch?
| const yamlSrcNoExt = yamlSrcPath.replace(".yaml", ""); | ||
| const hasSubCommands = (await (await glob.create(yamlSrcNoExt)).glob()).length > 1; |
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.
This checks if there are more than one data files with the same base name, indicating that the current data file has subcommands.
| if (hasSubCommands) { | ||
| placeholderPath = placeholderPath.replace('.md', '/_index.md'); | ||
| }; |
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.
If this has subcommands, the stub filename should be content/reference/cli/docker/cmd/_index.md.
Feel free to do it from a fork and open PR on buildx repo for testing |
Moving the CLI reference files caused the upstream validation workflow to break. This changes the logic in how placeholder files are created in the validation workflow, to match the new filesystem structure for markdown stubs. Signed-off-by: David Karlsson <35727626+dvdksn@users.noreply.github.com>
d7f0f0e to
9451374
Compare
Signed-off-by: David Karlsson 35727626+dvdksn@users.noreply.github.com
Description
Moving the CLI reference files caused the upstream validation workflow
to break.
This changes the logic in how placeholder files are created in the
validation workflow, to match the new filesystem structure for markdown
stubs.
Related issues
docker/buildx#2269
Verified with docker/buildx#2273