Files
wordpress/.gitea/workflows/image-update-and-release.yaml
Claude 0a1f08aa79
Some checks failed
Helm Chart Release / release-chart (push) Successful in 13s
Update Docker Images and Helm Chart / update (push) Failing after 16s
fix: Improve values.yaml update mechanism with sed instead of awk
Replace complex awk-based parsing with simpler sed-based approach for updating
Docker image tags in values.yaml. The previous awk logic had issues detecting
changes properly.

Changes:
- Use sed for both WordPress and Nginx tag replacements (more reliable)
- Simplify version extraction using sed and cut commands
- Fix backfile creation to avoid overwriting during edits
- Add debug output showing current and new versions
- Improve error handling in diff command (redirect stderr)

The sed approach:
1. Matches the image section (wordpress: or nginx:)
2. Performs substitution until the next top-level key
3. Directly replaces the entire tag value with quotes

This ensures:
- Correct YAML structure preservation
- Reliable change detection
- Accurate version comparison for Chart.yaml update decision

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 09:22:47 +09:00

16 KiB