feat(action): add deploy-helm-preview composite action#114
Draft
kriscoleman wants to merge 2 commits into
Draft
Conversation
Composite action that manages ephemeral Helm preview environments on Replicated CMX clusters for pull requests. Handles the full deploy lifecycle: sticky PR comment, GitHub deployment status, cluster create-or-reuse, port exposure, kubeconfig fetch, helm upgrade --install, and success/failure status updates. Teardown mode removes the cluster and posts a final torn-down comment.
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.
Summary
deploy-helm-previewthat manages ephemeral Helm preview environments on Replicated CMX clusters for pull requestshelm upgrade --install --wait→ success/failure status updatesmarocchino/sticky-pull-request-comment@v2with headercmx-helm-previewto avoid conflicts with other actionsgh apifor GitHub deployment status tracking with environment URLscreate-cluster,expose-port, andremove-clusteractions from this repo; inlineshelmCLI commands directly (sincehelm-installis a node24 action and needs kubeconfig as a file, not inline)Inputs
replicated-api-tokenchartchart-versionrelease-namenamespacedefaultvaluesvalues-filevalues-filecluster-namepr-123cluster-distributionk3scluster-version1.32cluster-ttl24hport443github-tokendeployments:write+pull-requests:writepr-numberenvironment-prefixprteardownfalsetrueon PR closecluster-idteardown=trueOutputs
cluster-id— the CMX cluster IDcluster-hostname— the ingress hostname from expose-portTest plan
deploy-helm-preview/action.ymlfor correctness of step conditionals (teardown != 'true'vsteardown == 'true')create-cluster/expose-port/remove-clusteraction refs use the correct tag (@v1)cluster-idoutput expression covers both create and reuse pathsmarocchino/sticky-pull-request-comment@v2input naming matches the action's actual interfacecluster-idbetween deploy and teardown jobs (artifact, repo variable, or environment)🤖 Generated with Claude Code