Skip to content

Add Go bot image pipeline to game workflow#201

Merged
PaulicStudios merged 1 commit intodevfrom
feature/add-go-bot-ci
Apr 6, 2026
Merged

Add Go bot image pipeline to game workflow#201
PaulicStudios merged 1 commit intodevfrom
feature/add-go-bot-ci

Conversation

@PaulicStudios
Copy link
Copy Markdown
Member

@PaulicStudios PaulicStudios commented Apr 6, 2026

Summary

  • Adds a new my-core-bot-go image pipeline to .github/workflows/game.yml for both PR validation and release publishing.
  • Splits the existing bot image naming to distinguish C, TS, and Go bot images explicitly.
  • Extends the matrix build and manifest merge flow to build, export digests for, and publish the Go bot image alongside the existing bots.
  • Adds tag generation and image inspection steps for the new Go bot release path.

Testing

  • Not run (workflow-only change).
  • Verified the workflow diff updates the PR build path, per-arch build path, and merge job wiring for my-core-bot-go.
  • Verified digest artifact names, metadata action IDs, and image references are consistent across build and merge steps.

Summary by CodeRabbit

  • Chores
    • Enhanced CI/CD pipeline to support multiple bot implementations with separate container image management and multi-architecture build support for each variant.

- Split C bot image naming into its own env var
- Build, tag, and merge multi-arch manifests for my-core-bot-go
- Update workflow step IDs and references to match the new bot image
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 6, 2026

📝 Walkthrough

Walkthrough

The GitHub Actions workflow is refactored to support multiple bot implementations. The C bot build pipeline is renamed from BOT_IMAGE to BOT_C_IMAGE with updated references throughout. A parallel Go bot pipeline is introduced with BOT_GO_IMAGE, including PR builds and production build/push/manifest merge stages.

Changes

Cohort / File(s) Summary
C Bot Rename
.github/workflows/game.yml
Renamed environment variable BOT_IMAGE to BOT_C_IMAGE and updated all downstream Docker metadata, build/push steps, digest export/import, and manifest merge operations to use new naming and corresponding step IDs (meta-bot-c, version-tags-bot-c, build-bot-c).
Go Bot Addition
.github/workflows/game.yml
Added new BOT_GO_IMAGE environment variable and PR build stage for my-core-bot-go using SERVER_IMAGE=local/server and TAG_NAME=pr-<sha>. Extended non-PR build-per-arch job with Go bot build/push steps by digest. Added new push-bot-go-merge job to download digests, compute metadata/tags, generate hierarchical version tags for releases, create multi-arch manifests, and inspect final image.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested reviewers

  • FreddyMSchubert

Poem

🐰 Hops with joy through YAML lines so neat,
Two bots now build in perfect sync, what a treat!
From C to Go, the pipelines align,
Multi-arch manifests in formation divine, 🚀
CI/CD dreams, now finally mine!

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding a Go bot image pipeline to the game workflow, which aligns with the primary objective of the PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/add-go-bot-ci

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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.

🧹 Nitpick comments (1)
.github/workflows/game.yml (1)

595-622: Consider extracting version tag generation to a composite action.

The version tag generation script (lines 595-622) is duplicated across server, C bot, TS bot, and Go bot merge jobs. As the number of bot types grows, this duplication increases maintenance burden.

You could create a composite action in .github/actions/generate-version-tags/action.yml:

name: 'Generate Version Tags'
inputs:
  image:
    required: true
outputs:
  additional-tags:
    value: ${{ steps.generate.outputs.additional-tags }}
runs:
  using: composite
  steps:
    - id: generate
      if: startsWith(github.ref, 'refs/tags/') && !contains(github.ref_name, '-')
      shell: bash
      run: |
        VERSION=${GITHUB_REF#refs/tags/}
        VERSION=${VERSION#v}
        IFS='.' read -r -a parts <<< "$VERSION"
        # ... rest of the script using ${{ inputs.image }}

This is optional since the current pattern is already established and works correctly.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.github/workflows/game.yml around lines 595 - 622, Extract the duplicated
tag-generation shell block from the "Generate additional version tags
(my-core-bot-go)" step into a reusable composite action (e.g.,
.github/actions/generate-version-tags/action.yml) that accepts an input "image"
and emits an output "additional-tags"; move the logic that computes VERSION,
strips the leading v, splits into parts and builds ADDITIONAL_TAGS using the
provided image (replace references to env.BOT_GO_IMAGE with the composite input)
and set the composite step id to "generate" so the action exposes
outputs.generate.outputs.additional-tags, then update the workflow step to call
this composite action with image: ${{ env.BOT_GO_IMAGE }} and consume its
"additional-tags" output instead of inlining the script.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In @.github/workflows/game.yml:
- Around line 595-622: Extract the duplicated tag-generation shell block from
the "Generate additional version tags (my-core-bot-go)" step into a reusable
composite action (e.g., .github/actions/generate-version-tags/action.yml) that
accepts an input "image" and emits an output "additional-tags"; move the logic
that computes VERSION, strips the leading v, splits into parts and builds
ADDITIONAL_TAGS using the provided image (replace references to env.BOT_GO_IMAGE
with the composite input) and set the composite step id to "generate" so the
action exposes outputs.generate.outputs.additional-tags, then update the
workflow step to call this composite action with image: ${{ env.BOT_GO_IMAGE }}
and consume its "additional-tags" output instead of inlining the script.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 1257b030-8ef2-49c9-8028-9833bd570bfe

📥 Commits

Reviewing files that changed from the base of the PR and between a6ea4b8 and c898954.

📒 Files selected for processing (1)
  • .github/workflows/game.yml

@PaulicStudios PaulicStudios merged commit 737b32c into dev Apr 6, 2026
7 checks passed
@PaulicStudios PaulicStudios deleted the feature/add-go-bot-ci branch April 6, 2026 20:30
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