From 543b9a7546b41847ebcf7d2201aae8a7e794c0ec Mon Sep 17 00:00:00 2001 From: pieter Date: Tue, 17 Feb 2026 04:19:59 +0000 Subject: [PATCH] =?UTF-8?q?.gitea/workflows/image-update-and-release.yaml?= =?UTF-8?q?=20=E3=82=92=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../workflows/image-update-and-release.yaml | 39 ++++++++++++------- 1 file changed, 26 insertions(+), 13 deletions(-) diff --git a/.gitea/workflows/image-update-and-release.yaml b/.gitea/workflows/image-update-and-release.yaml index 734455a..2ae0862 100644 --- a/.gitea/workflows/image-update-and-release.yaml +++ b/.gitea/workflows/image-update-and-release.yaml @@ -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