Commit Graph

167 Commits

Author SHA1 Message Date
945e4e4d29 refactor: Simplify values.yaml update using exact version matching
All checks were successful
Helm Chart Release / release-chart (push) Successful in 13s
Update Docker Images and Helm Chart / update (push) Successful in 22s
Refactor the Update values.yaml step to use exact version matching instead of
regex patterns. This approach is simpler, more reliable, and mirrors the
successful implementation in other Helmcharts (e.g., php-fpm).

Changes:
- Extract full current versions using awk (easier to parse)
- Use exact string replacement: sed 's|old_exact_version|new_exact_version|g'
- Only update if version has actually changed (conditional sed)
- Better error handling with set -e
- Clearer logging of what changed

Benefits:
1. Simpler logic: exact match instead of regex patterns
2. More reliable: no regex pattern matching failures
3. Proven approach: matches successful implementation in other projects
4. Clearer intent: code reads like "if version changed, update it"
5. Better debugging: conditional echo statements show exactly what happened

Flow:
1. Get current full version from values.yaml (e.g., 6.9.0-php8.5-fpm-alpine)
2. Get latest version from Docker Hub (shared variable)
3. If different, replace exact old version with exact new version
4. Report what changed (or didn't change)
5. Determine if WordPress version changed for Chart.yaml update decision

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 09:50:06 +09:00
64c360f391 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>
2026-02-12 09:40:20 +09:00
71278b4036 refactor: Use shared variables for Docker version management
Some checks failed
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Failing after 16s
Refactor the workflow to use shared variables ($GITHUB_OUTPUT) for version
information, improving code maintainability and reducing redundancy.

Changes:
- Add version_base output to Fetch WordPress step (e.g., "6.9.1")
- Add version_base output to Fetch Nginx step (e.g., "1.29.5")
- Update values.yaml step to use shared variables
  - Reference steps.wordpress.outputs.version_base instead of parsing
  - Reference steps.wordpress.outputs.version (full tag) and steps.nginx.outputs.version
- Update Increment chart version step
  - Use steps.wordpress.outputs.version_base directly for Chart.yaml version
  - Eliminate redundant parsing of values.yaml

Benefits:
1. Single source of truth: Version extracted once in fetch steps
2. Reduced code complexity: Eliminate multiple sed/grep operations
3. Better maintainability: Changes to version format only need updating fetch steps
4. Clearer logic: Each step has clear responsibility
5. Improved reliability: Less error-prone than multiple parsing operations

Version flow:
1. Fetch WordPress → outputs: version, version_base
2. Fetch Nginx → outputs: version, version_base
3. Update values.yaml → uses version (full tag)
4. Increment chart version → uses version_base

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 09:34:07 +09:00
0a1f08aa79 fix: Improve values.yaml update mechanism with sed instead of awk
Some checks failed
Helm Chart Release / release-chart (push) Successful in 13s
Update Docker Images and Helm Chart / update (push) Failing after 16s
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
d970cfa84a fix: Improve release process with proper error handling and retry logic
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Successful in 15s
Enhance the release tag creation and Helm package push procedures:

Create Helm package improvements:
- Add retry logic for git push (up to 3 attempts)
- Rebase on failure to resolve conflicts
- Fail with exit 1 if push ultimately fails (was silently ignored)
- Log success message

Create release tag improvements:
- Check if tag already exists before creating (avoid duplicate creation)
- Add retry logic for tag push (up to 3 attempts)
- Fail with exit 1 if push ultimately fails (prevents silent failures)
- Suppress error output during retry to keep logs clean
- Better logging of tag creation and push success

These changes ensure that:
1. Failed releases don't go unnoticed (exit 1 instead of ignoring)
2. Transient network issues are handled gracefully (retry mechanism)
3. Duplicate tags are avoided
4. Release artifacts are reliably pushed to remote

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 08:19:59 +09:00
20081bdda9 fix: Update both version and appVersion in Chart.yaml during WordPress updates
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Successful in 16s
When WordPress version changes, both Chart.yaml fields should be updated to match:
- version: WordPress version (e.g., 6.9.4)
- appVersion: WordPress version (e.g., 6.9.4)

Previously only 'version' was updated while 'appVersion' remained stale.

Changes:
- Extract current appVersion before update
- Update appVersion with sed command (in addition to version)
- Log both version and appVersion changes

This ensures Chart.yaml always reflects the actual WordPress version deployed.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 08:18:06 +09:00
512c80ab53 fix: Do not carry over suffix when WordPress version updates
All checks were successful
Helm Chart Release / release-chart (push) Successful in 15s
Update Docker Images and Helm Chart / update (push) Successful in 19s
When WordPress version changes (e.g., 6.9.3 → 6.9.4), Chart.yaml should use
the new WordPress version WITHOUT any suffix.

Suffix (-a, -b, etc.) is only used for multiple releases within the SAME
WordPress version when non-WordPress changes occur.

Changes:
- Simplify Increment chart version step to directly use new WordPress version
- Remove complex suffix handling logic (only needed for non-WordPress updates)
- Extract WordPress version from values.yaml and apply as Chart version

Examples:
- 6.9.3-a + WordPress update → 6.9.4 (no suffix)
- 6.9.4 + Nginx update → 6.9.4-a (suffix added for non-WordPress changes)
- 6.9.4-a + Nginx update → 6.9.4-b (suffix incremented)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 19:31:01 +09:00
7959242e1a fix: Fix workflow to update Chart.yaml only when WordPress version changes
All checks were successful
Helm Chart Release / release-chart (push) Successful in 13s
Update Docker Images and Helm Chart / update (push) Successful in 17s
Refactor the image-update-and-release workflow to correctly handle Chart.yaml updates:

Changes:
- Add chart_version_update_needed flag in Update values.yaml step
  - Compares WordPress version before/after update
  - Only sets flag=true if WordPress version actually changed
- Modify Increment chart version step to run only when chart_version_update_needed=true
  - Implement proper suffix handling for versions like 6.9.3-a, 6.9.3-b, etc
  - Support upgrading base version without suffix to add -a suffix
- Update Commit and push changes step
  - Always add values.yaml
  - Only add Chart.yaml if WordPress version was updated
- Update Create Helm package and Create release tag steps
  - Only run if Chart.yaml was updated (chart_version_update_needed=true)
- Update Summary step to show whether Chart.yaml was updated

This prevents Chart.yaml from being updated when only Nginx or other images change,
avoiding version number regression issues (e.g., 6.9.3 -> 6.9.4 when only Nginx updated).

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 19:28:38 +09:00
Gitea Actions
732bf94cdd chore: Add Helm package for version 6.9.4 2026-02-10 05:11:45 +00:00
Gitea Actions
5318017bc9 chore: Update Docker images
- WordPress: 6.9.0-php8.5-fpm-alpine -> 6.9.1-php8.5-fpm-alpine
- Nginx: 1.29.4-alpine-perl -> 1.29.5-alpine-perl

Auto-updated by Gitea Actions
2026-02-10 05:11:42 +00:00
31935a5c68 feat: Add configurable real IP forwarding for bare-metal clusters
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Successful in 22s
Implement a new nginx.forwardRealIP configuration flag to enable/disable
real client IP extraction from X-Forwarded-For headers on bare-metal clusters.

Changes:
- Added nginx.forwardRealIP.enabled flag (default: false) to values.yaml
- Added nginx.forwardRealIP.trustedProxies list for flexible proxy IP ranges
- Updated Nginx configmap to conditionally apply real IP extraction settings
- Updated FastCGI parameters to use real IP when enabled, direct connection IP otherwise
- Updated WordPress wp-config.php to conditionally extract real IPs from headers

Configuration:
- When enabled: Extracts real client IP from X-Forwarded-For header
- When disabled: Uses direct connection IP (default Nginx behavior)
- Supports custom proxy IP ranges for CloudFlare, AWS ALB, etc.

This allows Helmchart to work seamlessly on both:
1. Bare-metal clusters with iptables load balancing
2. Cloud-managed clusters with proper IP forwarding

Version bumped to 6.9.0-a (WordPress version with implementation suffix)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 14:11:02 +09:00
Gitea Actions
2f4a6092e8 chore: Add Helm package for version 6.9.3 2026-02-10 05:07:31 +00:00
Gitea Actions
7a3847494f chore: Update Docker images
- WordPress: 6.9.0-php8.5-fpm-alpine -> 6.9.1-php8.5-fpm-alpine
- Nginx: 1.29.4-alpine-perl -> 1.29.5-alpine-perl

Auto-updated by Gitea Actions
2026-02-10 05:07:28 +00:00
Gitea Actions
c8047c4ff2 chore: Add Helm package for version 6.9.2 2026-02-10 05:01:39 +00:00
Gitea Actions
800255947f chore: Update Docker images
- WordPress: 6.9.0-php8.5-fpm-alpine -> 6.9.1-php8.5-fpm-alpine
- Nginx: 1.29.4-alpine-perl -> 1.29.5-alpine-perl

Auto-updated by Gitea Actions
2026-02-10 05:01:36 +00:00
81a9b35689 fix: Handle image version updates gracefully when no changes detected
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Successful in 20s
Changed the 'Update values.yaml' step to skip error exit when no version updates
are available. Instead of failing with exit 1, the workflow now logs an INFO
message and continues execution, allowing the workflow to complete successfully
when versions are already up to date.

- Changed ERROR message to INFO message
- Replaced exit 1 with conditional logic
- Added else clause to log when changes are detected

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-10 14:00:52 +09:00
db31200572 .gitea/workflows/image-update-and-release.yaml を更新
Some checks failed
Helm Chart Release / release-chart (push) Successful in 11s
Update Docker Images and Helm Chart / update (push) Failing after 16s
2026-02-10 04:52:59 +00:00
Gitea Actions
605b15b9fa chore: Add Helm package for version 6.9.1 2026-02-05 07:06:20 +00:00
Gitea Actions
0d9a89ba5c chore: Update Docker images
- WordPress: 6.9.0-php8.5-fpm-alpine -> 6.9.1-php8.5-fpm-alpine
- Nginx: 1.29.4-alpine-perl -> 1.29.5-alpine-perl

Auto-updated by Gitea Actions
2026-02-05 07:06:11 +00:00
c409ab9e0b 定期動作していなかったため修正
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
Update Docker Images and Helm Chart / update (push) Successful in 43s
2026-02-05 07:05:28 +00:00
08a702bead .gitea/workflows/update-images.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
2026-02-05 06:51:56 +00:00
fe991dea2a ユーザーIP取得対応
All checks were successful
Helm Chart Release / release-chart (push) Successful in 11s
Update Docker Image Tags and Release Helm Chart / update-and-release (push) Successful in 19s
2026-02-02 01:39:57 +00:00
7bf7fb69ad ユーザーIP取得対応
All checks were successful
Helm Chart Release / release-chart (push) Successful in 11s
2026-02-02 00:22:40 +00:00
6cddfe1319 ユーザーIP取得対応
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
2026-02-02 00:18:45 +00:00
2319dbd7e9 ユーザーIP取得対応
All checks were successful
Helm Chart Release / release-chart (push) Successful in 12s
2026-02-02 00:14:53 +00:00
3e75bd339e Chart.yaml を更新
Some checks failed
Helm Chart Release / release-chart (push) Failing after 12s
Update Docker Image Tags and Release Helm Chart / update-and-release (push) Successful in 16s
2025-12-24 06:24:55 +00:00
abb41b9c3a values.yaml を更新 2025-12-17 00:33:17 +00:00
47a46d4d02 Chart.yaml を更新 2025-12-17 00:13:24 +00:00
a35df09710 templates/configmap.yaml を更新 2025-12-17 00:11:00 +00:00
295983f6de templates/configmap.yaml を更新 2025-12-16 22:44:07 +00:00
a8cebda66f Chart.yaml を更新 2025-12-15 08:21:49 +00:00
dc328836a2 templates/deployment.yaml を更新 2025-12-15 08:21:22 +00:00
20efa793d7 templates/configmap.yaml を更新 2025-12-15 08:13:46 +00:00
4f198495a8 Chart.yaml を更新 2025-12-15 06:36:57 +00:00
601c2d3eb3 templates/configmap.yaml を更新 2025-12-15 06:36:28 +00:00
de24a10acb Chart.yaml を更新 2025-12-15 02:16:05 +00:00
db7775a573 Chart.yaml を更新 2025-12-15 02:13:23 +00:00
0cb5560ad0 templates/configmap.yaml を更新 2025-12-15 02:11:34 +00:00
GitHub Actions Bot
e8fb0e1bbf chore: update to WordPress 6.9.0 2025-12-15 02:01:24 +00:00
625ed3df0b Chart.yaml を更新 2025-12-13 23:02:12 +00:00
bd3b61a417 templates/configmap.yaml を更新 2025-12-13 23:01:54 +00:00
ef2a4f2e10 Chart.yaml を更新 2025-12-13 22:51:30 +00:00
a711ccdc3f templates/configmap.yaml を更新 2025-12-13 22:51:02 +00:00
2c9443d725 Chart.yaml を更新 2025-12-13 11:07:13 +00:00
1d0855e593 templates/configmap.yaml を更新 2025-12-13 11:06:51 +00:00
e4e1a406b0 Chart.yaml を更新 2025-12-13 10:44:19 +00:00
4b0a613bc6 templates/deployment.yaml を更新 2025-12-13 10:43:56 +00:00
7e86619927 templates/configmap.yaml を更新 2025-12-13 10:43:04 +00:00
888ad3b1ea Chart.yaml を更新 2025-12-12 23:02:41 +00:00
7e0b839093 templates/deployment.yaml を更新 2025-12-12 23:01:54 +00:00