Skip to content

fix(cd): docker image name need lowercase#11

Merged
w31r4 merged 1 commit into
AstrBotDevs:mainfrom
camera-2018:fix-cd-name-lowercase
Mar 22, 2026
Merged

fix(cd): docker image name need lowercase#11
w31r4 merged 1 commit into
AstrBotDevs:mainfrom
camera-2018:fix-cd-name-lowercase

Conversation

@camera-2018
Copy link
Copy Markdown
Contributor

@camera-2018 camera-2018 commented Mar 22, 2026

Summary by Sourcery

Build:

  • Adjust CD workflow IMAGE_PREFIX to use github.repository to ensure Docker image names are always lowercase.

Copilot AI review requested due to automatic review settings March 22, 2026 16:06
@gemini-code-assist
Copy link
Copy Markdown

Note

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

Copy link
Copy Markdown

@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 found 1 issue, and left some high level feedback:

  • 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.
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>

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.

Comment thread .github/workflows/cd.yml
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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_PREFIX from ghcr.io/${{ github.repository_owner }}/shipyard-neo to ghcr.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.

@w31r4 w31r4 merged commit dbe972b into AstrBotDevs:main Mar 22, 2026
10 of 11 checks passed
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.

3 participants