Define DOCKER_IMAGE_NAME_TAG independently#2425
Conversation
Define DOCKER_IMAGE_NAME_TAG independently because GH actions are not able to make expansion from previous env defined variable. Signed-off-by: Ivan Hrasko <[email protected]>
Summary of ChangesHello @ihrasko, 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 resolves a critical issue in the GitHub Actions workflow related to environment variable expansion. By explicitly defining the Highlights
Using Gemini Code AssistThe 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
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 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
|
There was a problem hiding this comment.
Code Review
The pull request modifies the action.yml file to define the DOCKER_IMAGE_NAME_TAG environment variable independently, addressing an issue where GitHub Actions couldn't expand it from a previously defined variable. The change hardcodes the image name and tag, which might reduce flexibility and increase the risk of inconsistencies if the image name or tag format changes in the future. I have added a review comment to address this.
| DOCKER_IMAGE_TAG_LATEST: ${{ inputs.image-tag-latest }} | ||
| PUBLISH_ACCESS_KEY: ${{ inputs.publish-access-key }} | ||
| DOCKER_IMAGE_NAME_TAG: $DOCKER_IMAGE_NAME:${{ inputs.version }} | ||
| DOCKER_IMAGE_NAME_TAG: ghcr.io/pantheontech/${{ inputs.image-name }}:${{ inputs.version }} |
There was a problem hiding this comment.
The DOCKER_IMAGE_NAME_TAG is now hardcoded. While this fixes the immediate issue, it reduces flexibility. Consider defining the DOCKER_IMAGE_NAME and DOCKER_IMAGE_VERSION as separate inputs and constructing the tag within the script to avoid hardcoding the registry and organization.
For example, you could define DOCKER_REGISTRY and DOCKER_ORG inputs, then construct the tag like this:
DOCKER_IMAGE_NAME_TAG=$DOCKER_REGISTRY/$DOCKER_ORG/${{ inputs.image-name }}:${{ inputs.version }} DOCKER_IMAGE_NAME_TAG: ${{ inputs.docker-registry }}/${{ inputs.docker-org }}/${{ inputs.image-name }}:${{ inputs.version }}
Define DOCKER_IMAGE_NAME_TAG independently because GH actions are not able to make expansion from previous env defined variable.