Skip to content

[actions] build on PR#25

Merged
capcom6 merged 1 commit intomasterfrom
actions/build-on-pr
Aug 11, 2025
Merged

[actions] build on PR#25
capcom6 merged 1 commit intomasterfrom
actions/build-on-pr

Conversation

@capcom6
Copy link
Copy Markdown
Member

@capcom6 capcom6 commented Aug 10, 2025

Summary by CodeRabbit

  • New Features

    • Added a new automated workflow for pull requests that builds, packages, and uploads platform-specific artifacts, and provides download links directly in the pull request.
    • Introduced multi-architecture Docker image support (amd64 and arm64) with unified manifest tags for easier Docker pulls.
  • Chores

    • Updated release workflow configuration and naming for improved clarity and consistency.
    • Enhanced artifact and Docker image publishing processes in CI workflows.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Aug 10, 2025

🤖 Pull request artifacts

Platform File
🍎 Darwin arm64 smsgate_Darwin_arm64.tar.gz
🍎 Darwin x86_64 smsgate_Darwin_x86_64.tar.gz
🐳 Docker GitHub Container Registry
🐧 Linux arm64 smsgate_Linux_arm64.tar.gz
🐧 Linux i386 smsgate_Linux_i386.tar.gz
🐧 Linux x86_64 smsgate_Linux_x86_64.tar.gz
🪟 Windows arm64 smsgate_Windows_arm64.zip
🪟 Windows i386 smsgate_Windows_i386.zip
🪟 Windows x86_64 smsgate_Windows_x86_64.zip

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Aug 10, 2025

Warning

Rate limit exceeded

@capcom6 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 3 minutes and 53 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 19e5862 and 643200b.

📒 Files selected for processing (3)
  • .github/workflows/pr.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .goreleaser.yaml (1 hunks)

Walkthrough

A new GitHub Actions workflow for pull requests was added, automating multi-platform builds, artifact uploads, and Docker image publishing for PRs targeting the master branch. The release workflow was updated to always log in to Docker registries. The GoReleaser configuration was enhanced for multi-architecture Docker image support and manifest creation.

Changes

Cohort / File(s) Change Summary
PR Workflow Addition
.github/workflows/pr.yml
Introduces a new GitHub Actions workflow for PRs on master: checks out code, sets up Go, builds with GoReleaser in snapshot mode, uploads artifacts to S3, builds and pushes multi-arch Docker images and manifests, and manages PR comments with artifact links.
Release Workflow Update
.github/workflows/release.yml
Renames workflow, removes commented-out permissions, and makes Docker registry logins unconditional (no longer skips on PR events).
GoReleaser Multi-Arch Docker
.goreleaser.yaml
Expands Docker build configuration to support both AMD64 and ARM64 architectures, adds multi-arch Docker manifest creation, and updates build flags for platform specification.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub PR Event
    participant GitHub Actions Runner
    participant GoReleaser
    participant S3
    participant GHCR (GitHub Container Registry)
    participant PR Comment

    GitHub PR Event->>GitHub Actions Runner: Trigger PR workflow
    GitHub Actions Runner->>GitHub Actions Runner: Checkout code, setup Go
    GitHub Actions Runner->>GoReleaser: Build artifacts (multi-platform, snapshot)
    GoReleaser->>GitHub Actions Runner: Return build artifacts
    GitHub Actions Runner->>S3: Upload build artifacts
    GitHub Actions Runner->>GHCR: Build & push Docker images (amd64, arm64)
    GitHub Actions Runner->>GHCR: Create and push multi-arch manifest
    GitHub Actions Runner->>PR Comment: Create/update comment with artifact & image links
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~15 minutes

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch actions/build-on-pr

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 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.
  • 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.

Support

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

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 generate unit tests to generate unit tests for 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.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🔭 Outside diff range comments (1)
.github/workflows/release.yml (1)

21-25: Add QEMU and Buildx setup for reliable multi-arch Docker builds

GoReleaser with buildx benefits from explicitly setting up QEMU and Buildx on runners.

       - name: Set up Go
         uses: actions/setup-go@v5
         with:
           go-version: stable

+      - name: Set up QEMU
+        uses: docker/setup-qemu-action@v3
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
🧹 Nitpick comments (3)
.github/workflows/pr.yml (3)

12-16: Add concurrency to auto-cancel superseded runs per PR

Prevents redundant builds on rapid pushes.

 jobs:
   goreleaser:
     runs-on: ubuntu-latest
     if: github.actor != 'dependabot[bot]'
+    concurrency:
+      group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
+      cancel-in-progress: true

21-25: Enable module cache to speed builds

setup-go supports caching.

       - name: Set up Go
         uses: actions/setup-go@v5
         with:
-          go-version: stable
+          go-version: stable
+          cache: true

76-103: Improve the PR comment content for Docker image and pin actions

  • GHCR doesn’t have a browsable page per tag; provide a docker pull command instead of a link.
  • Optionally add artifact for smsgate-ca if needed (built by GoReleaser).
       - name: Create or update comment
         uses: peter-evans/create-or-update-comment@v4
         with:
@@
-            | 🐳 Docker         | [GitHub Container Registry](https://ghcr.io/${{ github.repository }}:pr-${{ github.event.pull_request.number }})                                                        |
+            | 🐳 Docker         | `docker pull ghcr.io/${{ github.repository }}:pr-${{ github.event.pull_request.number }}`                                                                              |

Also consider whether you want to include smsgate-ca artifacts here; they’re built but not listed.

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 0bad3ba and f8865a6.

📒 Files selected for processing (3)
  • .github/workflows/pr.yml (1 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .goreleaser.yaml (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: goreleaser
🔇 Additional comments (2)
.goreleaser.yaml (1)

91-125: Docker manifest definitions look correct

Manifest entries aggregate the -amd64 and -arm64 images under unified tags for both GHCR and Docker Hub. Good coverage for full, major, minor, and latest tags.

.github/workflows/release.yml (1)

26-38: Unconditional registry logins are OK on tag pushes

Since this workflow only triggers on tags, logging into Docker Hub and GHCR unconditionally is acceptable.

Comment thread .github/workflows/pr.yml
Comment thread .github/workflows/pr.yml
Comment thread .github/workflows/pr.yml
Comment thread .github/workflows/pr.yml
Comment thread .github/workflows/pr.yml
Comment thread .goreleaser.yaml
Comment thread .goreleaser.yaml
@capcom6 capcom6 force-pushed the actions/build-on-pr branch from 19e5862 to 643200b Compare August 11, 2025 02:31
@capcom6 capcom6 merged commit 3b00774 into master Aug 11, 2025
5 checks passed
@capcom6 capcom6 deleted the actions/build-on-pr branch August 11, 2025 06:48
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