chore: release workflow for codegen 3.0 - adjustments#12735
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adjusts the Codegen 3.0 release automation by moving Docker image build/push (and optional Rancher deployment) behind a reusable GitHub Actions workflow, and by extending the release file update script to keep pom.docker.xml’s version aligned during post-release snapshot bumps.
Changes:
- Refactors
release-codegen-3.ymlto call the reusabledocker-release-3.0.ymlworkflow instead of inlining Docker build/push and Rancher deploy steps. - Enhances
docker-release-3.0.ymlwithworkflow_callinputs (tag,deploy_online) and standardizes tag sourcing viainputs.tag. - Updates
CI/release/update-codegen-release-files.pyto also updatepom.docker.xmlversion when transitioning back to the next snapshot.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
CI/release/update-codegen-release-files.py |
Adds post-release alignment of pom.docker.xml version to the next snapshot. |
.github/workflows/release-codegen-3.yml |
Replaces the inline Docker/Rancher logic with a call to the reusable Docker release workflow and updates downstream job dependencies. |
.github/workflows/docker-release-3.0.yml |
Adds reusable workflow interface (workflow_call), deploy_online gating, and consistent tag input sourcing. |
Comments suppressed due to low confidence (1)
.github/workflows/docker-release-3.0.yml:168
- The
deploystep can run withinputs.deploy_onlinetrue even whensecrets.RANCHER2_BEARER_TOKENis not provided (it’s declared optional forworkflow_call, anddeploy_onlinedefaults to true). In that case the script will attempt Rancher API calls with an empty token and may fail in confusing ways (or behave inconsistently depending on curl/jq output). Consider guarding the step with an explicit token check (or make the secret required whendeploy_onlineis true) and failing fast with a clear error message when deployment is requested but the token is missing.
- name: deploy
if: ${{ inputs.deploy_online }}
run: |
echo "${{ env.TAG }}"
TOKEN="${{ secrets.RANCHER2_BEARER_TOKEN }}"
RANCHER_HOST="rancher.tools.swagger.io"
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daniel-kmiecik
approved these changes
May 13, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request refactors the CI/CD workflow for releasing and deploying the Swagger codegen and generator Docker images. The main improvements are the consolidation of Docker build and deployment steps into a reusable workflow, simplification of the deployment logic, and improved parameterization for easier configuration and maintenance.
Parameterization and Inputs:
taganddeploy_onlineas inputs, withdeploy_onlinedefaulting totrue, allowing flexible control over deployment to Rancher.Conditional Deployment:
deploy_onlineis true, enabling orchestrator-level skip gates for deployment.Environment and Variable Consistency:
Release Automation Script:
CI/release/update-codegen-release-files.pynow also updates the Docker POM version to match the next snapshot, ensuring version consistency across release artifacts.