.gitea/workflows/image-update-and-release.yaml を更新
All checks were successful
Helm Chart Release / release-chart (push) Successful in 5s

This commit is contained in:
2026-02-17 04:19:59 +00:00
parent d01c2fbf0c
commit 543b9a7546

View File

@@ -2,28 +2,24 @@ name: Update Docker Image Tags and Release Helm Chart
on:
schedule:
- cron: "0 2 * * 1" # 毎週月曜日 02:00 UTC
#- cron: "0 2 * * 1" # 毎週月曜日 02:00 UTC
- cron: "0 0 * * 0" # 毎週日曜日 00:00 UTC
workflow_dispatch:
jobs:
update-and-release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
fetch-depth: 0 # 完全な履歴を取得
- name: Install Helm
uses: azure/setup-helm@v3
with:
version: 'v3.12.0'
- name: Check for new WordPress version
- name: Check for new WordPress FPM Alpine version
id: wordpress
run: |
set -e
echo "Checking WordPress versions..."
echo "Checking WordPress FPM Alpine versions..."
CURRENT=$(grep -A3 "wordpress:" values.yaml | grep "tag:" | head -1 | sed 's/.*tag: *"\([^"]*\)".*/\1/' | tr -d ' ')
echo "Current WordPress: $CURRENT"
@@ -51,15 +47,23 @@ jobs:
echo "Latest WordPress: $LATEST"
echo "WordPress version: $APP_VERSION"
# バージョン情報を分解して表示
WP_VERSION=$(echo $LATEST | cut -d'-' -f1)
PHP_VERSION=$(echo $LATEST | cut -d'-' -f2)
echo " WordPress: $WP_VERSION"
echo " PHP: $PHP_VERSION"
echo " Base: fpm-alpine"
echo "current=$CURRENT" >> $GITHUB_OUTPUT
echo "latest=$LATEST" >> $GITHUB_OUTPUT
echo "app_version=$APP_VERSION" >> $GITHUB_OUTPUT
- name: Check for new Nginx version
- name: Check for new Nginx Alpine Perl version
id: nginx
run: |
set -e
echo "Checking Nginx versions..."
echo "Checking Nginx Alpine Perl versions..."
CURRENT=$(grep -A3 "nginx:" values.yaml | grep "tag:" | head -1 | sed 's/.*tag: *"\([^"]*\)".*/\1/' | tr -d ' ')
echo "Current Nginx: $CURRENT"
@@ -185,6 +189,12 @@ jobs:
echo "Successfully pushed changes to main branch"
- name: Install Helm
if: steps.update_values.outputs.chart_version_update_needed == 'true'
uses: azure/setup-helm@v3
with:
version: 'latest'
- name: Package Helm Chart
if: steps.check_update.outputs.wp_updated == 'true'
run: |
@@ -302,8 +312,11 @@ jobs:
if [ "$WP_UPDATED" = "true" ]; then
echo "✅ WordPress version updated - Release created (v${APP_VERSION})"
echo "WordPress updated: ${{ steps.wordpress.outputs.current }} -> ${{ steps.wordpress.outputs.latest }}"
echo "Nginx updated: ${{ steps.nginx.outputs.current }} -> ${{ steps.nginx.outputs.latest }}"
elif [ "${{ steps.check_update.outputs.update_needed }}" = "true" ]; then
echo " Nginx only update - No release (waiting for next WordPress update)"
echo "Nginx updated: ${{ steps.nginx.outputs.current }} -> ${{ steps.nginx.outputs.latest }}"
else
echo " Already up to date - no action required"
fi