Skip to content

Conversation

@darmach
Copy link
Member

@darmach darmach commented Nov 26, 2025

Adds environment input to build Kayobe docker image workflow template when selector set to input.

Adds environment input to build Kayobe docker image workflow template when selector set to input.
@darmach darmach requested a review from a team as a code owner November 26, 2025 13:31
@gemini-code-assist
Copy link

Summary of Changes

Hello @darmach, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request refines the Kayobe Docker image build process by integrating a conditional environment selection mechanism directly into the GitHub Actions workflow. This enhancement provides greater control and flexibility for users to specify the target environment when manually triggering the build, adapting to specific configuration requirements related to registry sharing.

Highlights

  • Conditional Environment Input: Introduced a new conditional input kayobe_environment to the build-kayobe-docker-image workflow template. This input allows users to select a target environment for the Kayobe workflow.
  • Input Activation Logic: The kayobe_environment input is only enabled when the github_environment_selector is set to 'input' and when registry sharing is not active (i.e., github_registry.share or github_default_registry.share is false).
  • Workflow Dispatch Enhancement: The change modifies the on: workflow_dispatch: section of the GitHub Actions workflow template to include this new environment selection capability, making the workflow more dynamic.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request adds a workflow input to select an environment when building the Kayobe docker image. My review identifies a significant issue where the workflow's matrix strategy doesn't use the selected environment, causing it to run for all environments instead of the chosen one. I've also suggested making the new input required and providing a default value to improve robustness. The fix for the matrix strategy will require a change outside of the current diff.

Comment on lines +12 to +17
inputs:
kayobe_environment:
description: |
Select the environment the kayobe workflow shall target.
type: choice
options: %% github_kayobe_environments %%

Choose a reason for hiding this comment

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

high

There are a couple of issues with the current implementation of the workflow input.

  1. Input should be required and have a default value: The kayobe_environment input should be marked as required: true to ensure a value is always provided by the user. It's also good practice to provide a default value, typically the first environment in the list. This prevents the workflow from running with an empty string if the user doesn't make a selection, which would cause failures later on.

  2. Matrix strategy ignores input: The job's matrix strategy (on line 32) is configured to iterate over all github_kayobe_environments, ignoring the environment selected via the new workflow_dispatch input. This means that even if a user selects a single environment, the job will run for all of them.

To fix this, you should update the inputs block as suggested below, and also modify the strategy.matrix.environment on line 32 to be ['${{ inputs.kayobe_environment }}']. This will ensure the job runs only for the environment selected by the user.

    inputs:
      kayobe_environment:
        description: |
          Select the environment the kayobe workflow shall target.
        type: choice
        required: true
        default: %% github_kayobe_environments | first %%
        options: %% github_kayobe_environments %%

@darmach darmach marked this pull request as draft November 26, 2025 13:36
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.

2 participants