feat: add opt-in dry_run input to skip commit/apply#9
Conversation
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 9c96e14. Configure here.
| else | ||
| echo "Skipped: deploy step (mode=${{ steps.mode.outputs.mode }})" | ||
| fi | ||
| echo "==================================================" No newline at end of file |
There was a problem hiding this comment.
Dry-run step writes to stdout, not step summary
Medium Severity
The PR description and test plan explicitly state that the dry-run step writes to $GITHUB_STEP_SUMMARY for review in the run UI, and includes the full kustomize build output. However, the implementation only uses echo to stdout — GITHUB_STEP_SUMMARY appears nowhere in the file. The dry-run output will be buried in action logs instead of being surfaced in the GitHub step summary panel, which defeats the stated purpose of the feature. The kustomize build output mentioned in the description is also absent.
Reviewed by Cursor Bugbot for commit 9c96e14. Configure here.
When dry_run=true, the action runs validation, image resolution, manifest render, and GitOps-mode detection end-to-end but skips the two terminal mutation steps (git-sync-commit for GitOps mode, kustomize-apply for kubectl mode). New Dry-run summary step renders the manifests into $GITHUB_STEP_SUMMARY for review. Default 'false'; absent input = current behavior bit-for-bit.
|
🎉 This PR is included in version 1.13.0 🎉 The release is available on:
Your semantic-release bot 📦🚀 |


Summary
Adds a new
dry_runboolean input (default'false') to gate the two terminal mutation steps:Commit changes for GitOps(skyhook-io/git-sync-commit@v1) - nowif: mode == 'gitops' && inputs.dry_run != 'true'Apply with kubectl(skyhook-io/kustomize-apply@v1) - nowif: mode == 'kubectl' && inputs.dry_run != 'true'Adds a new
Dry-run noticestep that fires whendry_run == 'true'and logs to stdout which terminal step was skipped plus the inputs it would have received. The existingDeployment plan summarystep (unchanged) already runskustomize buildand echoes the rendered manifests on every invocation, so dry-run users see the same plan output as a real run, just without the commit/apply.All pre-deploy steps (
Resolve image inputs,Update kustomize manifests,Inspect,Detect GitOps mode,Set deployment mode,Deployment context,Deployment plan summary) run unchanged - that is the point: verify what would deploy.Use case: rehearsal / preview runs. Image build + push (cheap, reusable) happens at the caller workflow level; this action stops short of the GitOps commit or
kubectl applyso users can validate the planned deployment without prod blast radius.Example
Dry-run noticeoutput (GitOps mode)Security hardening
The
Dry-run noticestep passes all values viaenv:block ($VARreferences in the shell) rather than${{ }}interpolation into therun:body. Prevents GitHub Actions script injection through operator-supplied fields such ascommit_message.Backwards compatibility
'false'. Callers that omit it get current behavior bit-for-bit identical.if:conditions collapse to the original predicate whendry_runis unset ('false' != 'true'istrue, so&& inputs.dry_run != 'true'is a no-op).Dry-run noticestep is gated byif: inputs.dry_run == 'true'and never fires for default callers.mode,namespace,deployment,workloads_json,managed_by) unchanged.@v1major-version tag remains additive-only.Coordination with open PRs
action.yml, sameinputs:block; textual conflict on input ordering, no semantic overlap. Either merge order works.main; independent concern, no conflict with this change.Test plan
dry_run: truein GitOps mode →Commit changes for GitOpsskips,Dry-run noticelogs the skipped step + would-have-been inputs, deploy repo gets no commitdry_run: truein kubectl mode →Apply with kubectlskips,Dry-run noticelogs the skipped step + would-have-been inputs, nokubectl applyagainst the clusterdry_run: false(or omitted) → behavior identical to current@v1commit_messagecontaining shell metacharacters (e.g."; echo PWNED; #) in a dry-run → printed as a literal string, no injection