Skip to content

feat: move to github docker registry#398

Merged
Cybertron01Z merged 1 commit intomasterfrom
feat/use-ghcr
May 22, 2025
Merged

feat: move to github docker registry#398
Cybertron01Z merged 1 commit intomasterfrom
feat/use-ghcr

Conversation

@Cybertron01Z
Copy link
Copy Markdown
Collaborator

@Cybertron01Z Cybertron01Z commented May 22, 2025

Summary by CodeRabbit

  • Chores
    • Updated build and deployment workflows to improve Docker image handling and publishing to GitHub Container Registry (GHCR).
    • Enhanced environment variable management during Docker image builds for greater consistency across development and master branches.
    • Adjusted build configuration to require explicit Docker registry and username settings for image tagging.
    • Modified rule application settings to enforce consistent processing regardless of file patterns.
    • Added new workflows to automate Docker image build and push on release events.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented May 22, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

The changes update Docker image build and publishing processes in GitHub Actions workflows and the build script. Environment variables for Docker registry and username are now required and explicitly set. Docker images are built and pushed to GitHub Container Registry (GHCR) using these variables, with stricter validation and updated tagging conventions. The master workflow now delegates build and push logic to a reusable workflow, and a new release workflow triggers this reusable workflow on release creation. Additionally, cursor rules were altered to apply unconditionally and forbid summaries.

Changes

File(s) Change Summary
.github/workflows/development.yml Added environment variables DOCKER_REGISTRY and DOCKER_USERNAME to the Docker build step.
.github/workflows/master.yml Removed inline build job; added build-and-push job referencing reusable workflow .github/workflows/build-and-push.yml.
.github/workflows/build-and-push.yml Added new reusable workflow for building and pushing Docker images to GHCR with Node.js setup, tests, and login.
.github/workflows/release.yml Added new workflow triggered on release creation that calls the reusable build-and-push workflow.
build/dockerImage.mjs Enforces presence of DOCKER_REGISTRY and DOCKER_USERNAME, converts username to lowercase, updates image tag prefix to include registry, cleans up console logs.
.cursor/rules/poinz.mdc Cleared JavaScript/JSX file globs, set alwaysApply to true, and added rule forbidding change summaries.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Node.js Environment
    participant Docker CLI
    participant GHCR

    GitHub Actions->>Node.js Environment: Setup Node.js 22
    Node.js Environment->>GitHub Actions: Ready
    GitHub Actions->>Docker CLI: Set DOCKER_REGISTRY & DOCKER_USERNAME env vars
    GitHub Actions->>Docker CLI: Run npm build script to build Docker image
    GitHub Actions->>Docker CLI: Login to GHCR using GitHub token
    Docker CLI->>GHCR: Authenticate and push image tags
Loading

Poem

Oh, you want your Docker builds to run?
Now you’ll need those vars—yes, every one!
No more “xeronimus” defaults for you,
The registry’s set, and the username too.
Push to GHCR, don’t you dare forget—
Or your pipeline will drown in regret!
🐳🛠️


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 9c91fa6 and 3ac9536.

📒 Files selected for processing (6)
  • .cursor/rules/poinz.mdc (1 hunks)
  • .github/workflows/build-and-push.yml (1 hunks)
  • .github/workflows/development.yml (1 hunks)
  • .github/workflows/master.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • build/dockerImage.mjs (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Cybertron01Z Cybertron01Z merged commit cd1ae4e into master May 22, 2025
1 of 2 checks passed
@Cybertron01Z Cybertron01Z deleted the feat/use-ghcr branch May 22, 2025 08:27
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.

1 participant