fix: Simplify sed patterns for values.yaml tag updates
Some checks failed
Helm Chart Release / release-chart (push) Successful in 13s
Update Docker Images and Helm Chart / update (push) Failing after 16s

The complex sed range-based patterns were failing to properly match and
replace Docker image tags in values.yaml. Replace with simpler, more
reliable patterns that directly match the full tag format.

Changes:
- WordPress: Match tag pattern ending with -php[0-9.]*-fpm-alpine
- Nginx: Match tag pattern ending with -alpine-perl
- Simpler single-line patterns reduce complexity and improve reliability

The new patterns:
- WordPress: s|tag: "[0-9.]*-php[0-9.]*-fpm-alpine"|tag: "NEW_VERSION"|
- Nginx: s|tag: "[0-9.]*-alpine-perl"|tag: "NEW_VERSION"|

These patterns are:
1. More specific - only match the intended tag lines
2. Simpler - single sed command per image (no range selection)
3. More reliable - less dependent on surrounding YAML structure
4. Easier to understand and maintain

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-02-12 09:40:20 +09:00
parent 71278b4036
commit 64c360f391

View File

@@ -179,11 +179,11 @@ jobs:
echo " WordPress: $WP_BASE ($WP_LATEST)" echo " WordPress: $WP_BASE ($WP_LATEST)"
echo " Nginx: $NGINX_LATEST" echo " Nginx: $NGINX_LATEST"
# WordPressのtagを更新 # WordPressのtagを更新(より単純で確実な方法)
sed -i "/^ wordpress:/,/^ [a-z]/s|tag: \"[^\"]*\"|tag: \"$WP_LATEST\"|" values.yaml sed -i "s|tag: \"[0-9.]*-php[0-9.]*-fpm-alpine\"|tag: \"$WP_LATEST\"|" values.yaml
# Nginxのtagを更新 # Nginxのtagを更新(より単純で確実な方法)
sed -i "/^ nginx:/,/^ [a-z]/s|tag: \"[^\"]*\"|tag: \"$NGINX_LATEST\"|" values.yaml sed -i "s|tag: \"[0-9.]*-alpine-perl\"|tag: \"$NGINX_LATEST\"|" values.yaml
# 変更内容を表示 # 変更内容を表示
echo "" echo ""