Add Go bot image pipeline to game workflow#201
Conversation
- 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
📝 WalkthroughWalkthroughThe GitHub Actions workflow is refactored to support multiple bot implementations. The C bot build pipeline is renamed from Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
🧹 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
📒 Files selected for processing (1)
.github/workflows/game.yml
Summary
my-core-bot-goimage pipeline to.github/workflows/game.ymlfor both PR validation and release publishing.Testing
my-core-bot-go.Summary by CodeRabbit