From 64c360f39110f3adb62cf98e95a74641ceb04639 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 12 Feb 2026 09:40:20 +0900 Subject: [PATCH] fix: Simplify sed patterns for values.yaml tag updates 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 --- .gitea/workflows/image-update-and-release.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitea/workflows/image-update-and-release.yaml b/.gitea/workflows/image-update-and-release.yaml index aae24a6..1c5563b 100644 --- a/.gitea/workflows/image-update-and-release.yaml +++ b/.gitea/workflows/image-update-and-release.yaml @@ -179,11 +179,11 @@ jobs: echo " WordPress: $WP_BASE ($WP_LATEST)" echo " Nginx: $NGINX_LATEST" - # WordPressのtagを更新 - sed -i "/^ wordpress:/,/^ [a-z]/s|tag: \"[^\"]*\"|tag: \"$WP_LATEST\"|" values.yaml + # WordPressのtagを更新(より単純で確実な方法) + sed -i "s|tag: \"[0-9.]*-php[0-9.]*-fpm-alpine\"|tag: \"$WP_LATEST\"|" values.yaml - # Nginxのtagを更新 - sed -i "/^ nginx:/,/^ [a-z]/s|tag: \"[^\"]*\"|tag: \"$NGINX_LATEST\"|" values.yaml + # Nginxのtagを更新(より単純で確実な方法) + sed -i "s|tag: \"[0-9.]*-alpine-perl\"|tag: \"$NGINX_LATEST\"|" values.yaml # 変更内容を表示 echo ""