Commit Graph

33 Commits

Author SHA1 Message Date
03825ed280 .gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s
2026-02-17 04:32:06 +00:00
5b66dd4c38 .gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s
2026-02-17 04:22:51 +00:00
e1ba03d31e .gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s
2026-02-17 04:21:30 +00:00
10deb9ca69 .gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 6s
2026-02-17 04:21:00 +00:00
543b9a7546 .gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s
2026-02-17 04:19:59 +00:00
d01c2fbf0c refactor: align workflow with phpfpm chart, add Gitea Release and Helm repo index
All checks were successful
Helm Chart Release / release-chart (push) Successful in 7s
- Rename steps/variables to match phpfpm chart naming conventions
  - job: update -> update-and-release
  - step: check -> check_update (id)
  - flag: chart_version_update_needed -> wp_updated
  - Checkout repository -> Checkout
  - Commit and push changes -> Commit changes
  - git user: Gitea Actions -> Gitea Actions Bot
- Add: Create Gitea Release step (API call + .tgz asset upload)
- Add: Update Helm Repository Index step (gh-pages branch management)
- Restructure: Move Install Helm before version checks (same as phpfpm)
- Simplify: Remove redundant steps (Get current versions, Check if update is needed merged into check_update)
- Add: app_version output to wordpress step (WordPress version number only)
- Align: cron schedule 0 2 * * 1 (Monday 02:00 UTC, same as phpfpm)

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-17 12:10:26 +09:00
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
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
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
9031d153c1 .gitea/workflows/update-images.yaml を更新 2025-12-05 01:48:30 +00:00
7808f78e1c .gitea/workflows/update-images.yaml を更新 2025-12-05 01:46:14 +00:00
9e673edd18 .gitea/workflows/update-images.yaml を更新 2025-12-05 01:34:34 +00:00
a4d6136c97 .gitea/workflows/update-images.yaml を更新 2025-12-05 01:32:47 +00:00
34235a58b6 .gitea/workflows/update-images.yaml を更新 2025-12-05 01:31:03 +00:00
5613be4685 .gitea/workflows/update-images.yaml を更新 2025-11-27 22:18:27 +00:00
8a4f2939f7 .gitea/workflows/update-images.yaml を更新 2025-11-27 11:03:56 +00:00
37683a37a6 .gitea/workflows/update-images.yaml を更新 2025-11-27 11:03:33 +00:00
0d6645430b .gitea/workflows/update-images.yaml を更新 2025-11-27 10:54:07 +00:00
fc99e6b8ff .gitea/workflows/update-images.yaml を追加 2025-11-25 10:33:46 +00:00
6dd34a2f41 .gitea/workflows/helm-release.yaml を更新 2025-11-25 04:46:39 +00:00
aeba1d87e6 .gitea/workflows/test.yaml を削除 2025-11-25 04:36:18 +00:00
6921bbc355 .gitea/workflows/helm-release.yaml を更新 2025-11-25 02:51:45 +00:00
a60566b4c8 .gitea/workflows/test.yaml を追加 2025-11-25 02:03:16 +00:00
2474593c4a .gitea/workflows/helm-release.yaml を追加 2025-11-21 03:54:18 +00:00