fix(cd): docker image name need lowercase#11
Merged
Conversation
|
Note Gemini is unable to generate a summary for this pull request due to the file types involved not being currently supported. |
There was a problem hiding this comment.
Hey - I've found 1 issue, and left some high level feedback:
- Using
github.repositorychanges the image name from.../<owner>/shipyard-neoto.../<owner>/<repo>, which may break consumers expecting the previousshipyard-neosuffix; consider whether you instead want to lowercase just the existing image name via an expression likeghcr.io/${{ toLower(github.repository_owner) }}/shipyard-neo. - The inline comment claiming
github.repositoryis always lowercase is not accurate for all repositories; if the goal is case normalization for GHCR, explicitly wrap the value intoLower(...)rather than relying on implicit casing.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Using `github.repository` changes the image name from `.../<owner>/shipyard-neo` to `.../<owner>/<repo>`, which may break consumers expecting the previous `shipyard-neo` suffix; consider whether you instead want to lowercase just the existing image name via an expression like `ghcr.io/${{ toLower(github.repository_owner) }}/shipyard-neo`.
- The inline comment claiming `github.repository` is always lowercase is not accurate for all repositories; if the goal is case normalization for GHCR, explicitly wrap the value in `toLower(...)` rather than relying on implicit casing.
## Individual Comments
### Comment 1
<location path=".github/workflows/cd.yml" line_range="23" />
<code_context>
REGISTRY: ghcr.io
- IMAGE_PREFIX: ghcr.io/${{ github.repository_owner }}/shipyard-neo
+ # github.repository is always lowercase (e.g. "astrbotdevs/shipyard-neo")
+ IMAGE_PREFIX: ghcr.io/${{ github.repository }}
concurrency:
</code_context>
<issue_to_address>
**issue (bug_risk):** Using `github.repository` changes behavior for forks and may publish images under fork owners
This change shifts from an org-level path to a repo-specific path, so images built from forks will now publish to `ghcr.io/<fork-owner>/<fork-repo>`. That can break workflows that assume a single, stable registry path for this project. If we don’t want per-fork publishing, we should either keep `github.repository_owner` (and handle lowercasing separately) or restrict publishing so only the canonical repo pushes images.
</issue_to_address>Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
There was a problem hiding this comment.
Pull request overview
Updates the CD GitHub Actions workflow to build/push GHCR images under a lowercase repository-based image prefix, aligning with Docker/GHCR image naming requirements.
Changes:
- Switch
IMAGE_PREFIXfromghcr.io/${{ github.repository_owner }}/shipyard-neotoghcr.io/${{ github.repository }}. - Add a brief comment explaining the lowercase assumption for
github.repository.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary by Sourcery
Build: