Conditional deployment based on version changes#7
Conversation
…oy without new versions - Remove azure/setup-helm and azure/setup-kubectl steps (available on runner by default) - Add hasNextVersion outputs to publish-server and publish-client jobs - Condition deploy job on at least one new version existing https://claude.ai/code/session_01Nmah5EbZ3m52ot23XTaf5e
Code ReviewOverall this is a clean, focused change that improves CI/CD efficiency. A few observations: Positive
Concerns1. Removing The deploy job presumably still runs Recommendation: confirm that either (a) the remaining deploy steps no longer invoke 2. Output availability when a job fails If 3. Minor: condition line length The if: github.event_name == 'push' && github.ref == 'refs/heads/main' && needs.check-versions.outputs.shouldDeploy == 'true'This is purely cosmetic but pays off as more services are added. SummaryThe core logic is correct and the optimization is worthwhile. The main thing to verify before merging is that the deploy job's remaining steps don't depend on the removed tool-setup actions. |
Summary
Updated the CI/CD pipeline to only trigger deployments when actual version changes are detected in either the server or client packages, and removed unnecessary tool setup steps from the deploy job.
Key Changes
outputsto bothpublish-serverandpublish-clientjobs to expose thehasNextVersionflag from the version detection stepdeployjob's conditional to only run when at least one of the published packages has a new version (hasNextVersion == 'true')azure/setup-helmandazure/setup-kubectlactions from the deploy job as they are no longer neededImplementation Details
The deploy job now depends on the output of the publish jobs to determine if a deployment is necessary. This prevents unnecessary deployments when there are no version changes, optimizing CI/CD resource usage and reducing noise in deployment logs.
https://claude.ai/code/session_01Nmah5EbZ3m52ot23XTaf5e