Skip to content

fix: move empty-diff guard before git commit in kubernetes.yaml#109

Closed
jmpalomares wants to merge 2 commits into
mainfrom
fix/restore-empty-diff-guard-before-commit
Closed

fix: move empty-diff guard before git commit in kubernetes.yaml#109
jmpalomares wants to merge 2 commits into
mainfrom
fix/restore-empty-diff-guard-before-commit

Conversation

@jmpalomares
Copy link
Copy Markdown
Contributor

Description

PR #82 added an empty-diff guard to the commit job in kubernetes.yaml, but placed it after git commit. After a commit, the staged index is clean by definition, so git diff --cached --quiet always passes and the script exits before git push origin main. Every consumer of @v8 has been silently creating the bot commit on the runner and throwing it away — Actions runs are green but origin/main never updates and the chart never bumps.

This moves the guard to right after git add ., where it actually short-circuits when there is nothing new to deploy, and removes it from the else branch where it was a no-op. Applies to both the env-tag and regular main paths.

PR #81 removed the original guard (which had been correctly placed before git commit).
PR #82 re-added it, but in the else branch after the commit — where the check is always true.

Copilot AI review requested due to automatic review settings May 4, 2026 15:57
@jmpalomares jmpalomares requested a review from a team as a code owner May 4, 2026 15:57
@github-actions github-actions Bot added the ci label May 4, 2026
@jmpalomares jmpalomares marked this pull request as draft May 4, 2026 15:59
@jmpalomares jmpalomares marked this pull request as ready for review May 5, 2026 08:10
@github-actions github-actions Bot added the yaml label May 5, 2026
@jmpalomares jmpalomares closed this May 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant