Skip to content

ci(release): skip docs PR when CLI reference is unchanged#786

Merged
doringeman merged 2 commits intomainfrom
docs
Mar 25, 2026
Merged

ci(release): skip docs PR when CLI reference is unchanged#786
doringeman merged 2 commits intomainfrom
docs

Conversation

@doringeman
Copy link
Contributor

@doringeman doringeman commented Mar 24, 2026

The update-docs job now checks whether any files under cmd/cli/docs/reference/ changed between the previous and current release tags before opening a PR in docker/docs. If no CLI reference docs changed, all subsequent steps are skipped.

When the PR is created, the second require block that go get adds to go.mod (containing all transitive dependencies of model-runner) is stripped after vendoring, so the PR only contains the model-runner version bump in the existing require block.

Test run for unchanged files: https://github.com/docker/model-runner/actions/runs/23498364715/job/68385961940.

@gemini-code-assist
Copy link
Contributor

Note

Gemini is unable to generate a review for this pull request due to the file types involved not being currently supported.

Copy link
Contributor

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The AWK one-liner that strips the second require block in go.mod is fairly brittle (e.g., relies on exact require (...) formatting and ordering); consider using go mod edit or a small Go/scripted helper that programmatically removes the unwanted requirements so it’s more robust to future formatting changes.
  • The gh api ... compare/${PREVIOUS_TAG}...${RELEASE_TAG} call will fail if either tag is missing or misaligned with the docker/model-runner repo; you may want a guard (or a try/catch-style fallback) so that a transient tag/compare issue doesn’t cause the whole release workflow to fail.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The AWK one-liner that strips the second `require` block in `go.mod` is fairly brittle (e.g., relies on exact `require (...)` formatting and ordering); consider using `go mod edit` or a small Go/scripted helper that programmatically removes the unwanted requirements so it’s more robust to future formatting changes.
- The `gh api ... compare/${PREVIOUS_TAG}...${RELEASE_TAG}` call will fail if either tag is missing or misaligned with the `docker/model-runner` repo; you may want a guard (or a try/catch-style fallback) so that a transient tag/compare issue doesn’t cause the whole release workflow to fail.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

doringeman and others added 2 commits March 24, 2026 17:41
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Dorin Geman <dorin.geman@docker.com>
@doringeman doringeman merged commit 7e4b3da into main Mar 25, 2026
14 of 23 checks passed
@doringeman doringeman deleted the docs branch March 25, 2026 09:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants