Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| b3c997241b | |||
| 2af1ed39a7 | |||
| 0b9c503f50 | |||
| 07186fb14a |
@@ -26,7 +26,6 @@ jobs:
|
|||||||
- name: Check jq availability
|
- name: Check jq availability
|
||||||
run: |
|
run: |
|
||||||
if ! command -v jq &> /dev/null; then
|
if ! command -v jq &> /dev/null; then
|
||||||
echo "Installing jq..."
|
|
||||||
apt-get update && apt-get install -y jq
|
apt-get update && apt-get install -y jq
|
||||||
fi
|
fi
|
||||||
jq --version
|
jq --version
|
||||||
@@ -36,16 +35,45 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "Checking n8n versions..."
|
echo "Checking n8n versions..."
|
||||||
CURRENT=$(grep "tag:" values.yaml | head -1 | sed 's/.*tag: *"\([^"]*\)".*/\1/' | tr -d ' ')
|
CURRENT=$(grep 'tag:' values.yaml | head -1 | sed 's/.*tag: *"\([^"]*\)".*/\1/' | tr -d ' ')
|
||||||
echo "Current n8n: $CURRENT"
|
echo "Current n8n: $CURRENT"
|
||||||
|
|
||||||
LATEST=$(curl -s "https://registry.hub.docker.com/v2/repositories/n8nio/n8n/tags?page_size=100" | \
|
# --- Source 1: GitHub Releases API ---
|
||||||
jq -r '.results[].name' | \
|
# Stable releases only (prerelease=false, draft=false), latest 30 entries
|
||||||
grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | \
|
GH_LATEST=$(curl -s --retry 3 --retry-delay 5 \
|
||||||
sort -V | tail -1)
|
"https://api.github.com/repos/n8n-io/n8n/releases?per_page=30" | \
|
||||||
|
jq -r '[.[] | select(.prerelease==false and .draft==false) | .tag_name] | first // empty' | \
|
||||||
|
sed 's/^n8n@//')
|
||||||
|
echo "GitHub latest: ${GH_LATEST:-not found}"
|
||||||
|
|
||||||
if [ -z "$LATEST" ]; then
|
# --- Source 2: Docker Hub page 1 (newest last_updated first) ---
|
||||||
echo "Warning: Could not fetch latest n8n version, using current"
|
# Docker Hub sorts by last_updated, so recent releases appear near the top.
|
||||||
|
# Page 1 alone is NOT reliable (some versions fall on later pages due to
|
||||||
|
# non-monotonic last_updated), but combined with GitHub it provides coverage
|
||||||
|
# for releases not yet promoted to GitHub "latest".
|
||||||
|
DH_RESPONSE=$(curl -s --retry 3 --retry-delay 5 \
|
||||||
|
"https://registry.hub.docker.com/v2/repositories/n8nio/n8n/tags?page_size=100")
|
||||||
|
DH_LATEST=""
|
||||||
|
if echo "$DH_RESPONSE" | jq -e '.results' > /dev/null 2>&1; then
|
||||||
|
DH_LATEST=$(echo "$DH_RESPONSE" | jq -r '.results[].name' \
|
||||||
|
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$' | sort -V | tail -1)
|
||||||
|
fi
|
||||||
|
echo "Docker Hub latest: ${DH_LATEST:-not found}"
|
||||||
|
|
||||||
|
# --- Take the maximum of both sources ---
|
||||||
|
ALL_CANDIDATES=$(printf '%s\n%s' "${GH_LATEST}" "${DH_LATEST}" \
|
||||||
|
| grep -E '^[0-9]+\.[0-9]+\.[0-9]+$')
|
||||||
|
LATEST=$(echo "$ALL_CANDIDATES" | sort -V | tail -1)
|
||||||
|
|
||||||
|
# --- Sanity check: LATEST must be >= CURRENT ---
|
||||||
|
if [ -n "$LATEST" ]; then
|
||||||
|
HIGHER=$(printf '%s\n%s' "$CURRENT" "$LATEST" | sort -V | tail -1)
|
||||||
|
if [ "$HIGHER" != "$LATEST" ]; then
|
||||||
|
echo "Warning: best candidate ($LATEST) is older than current ($CURRENT). Skipping update."
|
||||||
|
LATEST="$CURRENT"
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
echo "Warning: could not determine latest version from any source. Using current."
|
||||||
LATEST="$CURRENT"
|
LATEST="$CURRENT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -80,14 +108,10 @@ jobs:
|
|||||||
if: steps.check_update.outputs.update_needed == 'true'
|
if: steps.check_update.outputs.update_needed == 'true'
|
||||||
run: |
|
run: |
|
||||||
set -e
|
set -e
|
||||||
echo "Updating values.yaml..."
|
|
||||||
N8N_OLD="${{ steps.n8n.outputs.current }}"
|
N8N_OLD="${{ steps.n8n.outputs.current }}"
|
||||||
N8N_NEW="${{ steps.n8n.outputs.latest }}"
|
N8N_NEW="${{ steps.n8n.outputs.latest }}"
|
||||||
|
echo "Updating values.yaml: $N8N_OLD -> $N8N_NEW"
|
||||||
sed -i "s/tag: \"${N8N_OLD}\"/tag: \"${N8N_NEW}\"/" values.yaml
|
sed -i "s/tag: \"${N8N_OLD}\"/tag: \"${N8N_NEW}\"/" values.yaml
|
||||||
echo "n8n updated: $N8N_OLD -> $N8N_NEW"
|
|
||||||
|
|
||||||
echo "values.yaml updated"
|
|
||||||
git diff values.yaml
|
git diff values.yaml
|
||||||
|
|
||||||
- name: Update Chart.yaml version
|
- name: Update Chart.yaml version
|
||||||
@@ -100,12 +124,24 @@ jobs:
|
|||||||
echo "Chart.yaml updated to version $APP_VERSION"
|
echo "Chart.yaml updated to version $APP_VERSION"
|
||||||
cat Chart.yaml
|
cat Chart.yaml
|
||||||
|
|
||||||
|
- name: Update README version history
|
||||||
|
if: steps.check_update.outputs.release_needed == 'true'
|
||||||
|
run: |
|
||||||
|
set -e
|
||||||
|
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
||||||
|
# Insert new version row after the header row in the version history table
|
||||||
|
sed -i "/^| バージョン | n8n | 変更内容 |/{
|
||||||
|
n
|
||||||
|
a\| ${APP_VERSION} | ${APP_VERSION} | 自動更新 |
|
||||||
|
}" README.md
|
||||||
|
echo "README.md version history updated"
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
if: steps.check_update.outputs.update_needed == 'true'
|
if: steps.check_update.outputs.update_needed == 'true'
|
||||||
run: |
|
run: |
|
||||||
git config user.name "Claude"
|
git config user.name "Claude"
|
||||||
git config user.email "claude@cafepieters.com"
|
git config user.email "claude@cafepieters.com"
|
||||||
git add values.yaml Chart.yaml
|
git add values.yaml Chart.yaml README.md
|
||||||
git commit -m "chore: update n8n to ${{ steps.n8n.outputs.latest }}"
|
git commit -m "chore: update n8n to ${{ steps.n8n.outputs.latest }}"
|
||||||
git push origin main
|
git push origin main
|
||||||
|
|
||||||
@@ -135,7 +171,7 @@ jobs:
|
|||||||
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
||||||
CHART_NAME=$(grep '^name:' Chart.yaml | awk '{print $2}')
|
CHART_NAME=$(grep '^name:' Chart.yaml | awk '{print $2}')
|
||||||
PACKAGE_FILE="${CHART_NAME}-${APP_VERSION}.tgz"
|
PACKAGE_FILE="${CHART_NAME}-${APP_VERSION}.tgz"
|
||||||
RELEASE_BODY="n8n Helm Chart v${APP_VERSION} - n8n: ${{ steps.n8n.outputs.latest }}"
|
RELEASE_BODY="n8n Helm Chart v${APP_VERSION}"
|
||||||
|
|
||||||
EXISTING=$(curl -s \
|
EXISTING=$(curl -s \
|
||||||
-H "Authorization: token ${GITEA_TOKEN}" \
|
-H "Authorization: token ${GITEA_TOKEN}" \
|
||||||
@@ -166,7 +202,6 @@ jobs:
|
|||||||
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
||||||
PACKAGE_FILE="${CHART_NAME}-${APP_VERSION}.tgz"
|
PACKAGE_FILE="${CHART_NAME}-${APP_VERSION}.tgz"
|
||||||
|
|
||||||
echo "Publishing ${PACKAGE_FILE} to Gitea Package Registry..."
|
|
||||||
curl --fail-with-body \
|
curl --fail-with-body \
|
||||||
-u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" \
|
-u "${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_TOKEN }}" \
|
||||||
-X POST \
|
-X POST \
|
||||||
@@ -179,19 +214,10 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
APP_VERSION="${{ steps.n8n.outputs.latest }}"
|
||||||
UPDATE_NEEDED="${{ steps.check_update.outputs.update_needed }}"
|
UPDATE_NEEDED="${{ steps.check_update.outputs.update_needed }}"
|
||||||
RELEASE_NEEDED="${{ steps.check_update.outputs.release_needed }}"
|
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
if [ "$UPDATE_NEEDED" = "true" ]; then
|
if [ "$UPDATE_NEEDED" = "true" ]; then
|
||||||
echo "Update completed!"
|
echo "Updated to $APP_VERSION"
|
||||||
else
|
else
|
||||||
echo "Already up to date, no changes."
|
echo "Already up to date: $APP_VERSION"
|
||||||
fi
|
|
||||||
echo "========================================"
|
|
||||||
echo "n8n: ${APP_VERSION}"
|
|
||||||
if [ "$RELEASE_NEEDED" = "true" ]; then
|
|
||||||
echo "Chart Version: ${APP_VERSION} (released)"
|
|
||||||
echo "Registry: ${REGISTRY_URL}/api/packages/${OWNER}/helm"
|
|
||||||
else
|
|
||||||
echo "No release needed"
|
|
||||||
fi
|
fi
|
||||||
echo "========================================"
|
echo "========================================"
|
||||||
|
|||||||
+2
-2
@@ -2,8 +2,8 @@ apiVersion: v2
|
|||||||
name: n8n
|
name: n8n
|
||||||
description: A Helm chart for n8n workflow automation on Kubernetes (ARM/Raspberry Pi ready)
|
description: A Helm chart for n8n workflow automation on Kubernetes (ARM/Raspberry Pi ready)
|
||||||
type: application
|
type: application
|
||||||
version: "2.20.6"
|
version: "2.27.3"
|
||||||
appVersion: "2.20.6"
|
appVersion: "2.27.3"
|
||||||
keywords:
|
keywords:
|
||||||
- n8n
|
- n8n
|
||||||
- workflow
|
- workflow
|
||||||
|
|||||||
@@ -237,8 +237,11 @@ helm upgrade my-n8n cafepieters/n8n \
|
|||||||
|
|
||||||
| バージョン | n8n | 変更内容 |
|
| バージョン | n8n | 変更内容 |
|
||||||
|---|---|---|
|
|---|---|---|
|
||||||
| バージョン | n8n | 変更内容 |
|
| 2.27.3 | 2.27.3 | 自動更新 |
|
||||||
|---|---|---|
|
| 2.26.3 | 2.26.3 | 自動更新ワークフロー修正(GitHub Releases + Docker Hub ハイブリッドソース) |
|
||||||
|
| 2.22.2 | 2.22.2 | 自動更新 |
|
||||||
|
| 2.21.3 | 2.21.3 | 自動更新 |
|
||||||
|
| 2.20.6 | 2.20.6 | 自動更新 |
|
||||||
| 2.19.2-c | 2.19.2 | 暗号化キー復旧手順を README に追加 |
|
| 2.19.2-c | 2.19.2 | 暗号化キー復旧手順を README に追加 |
|
||||||
| 2.19.2-b | 2.19.2 | 暗号化キーを `lookup` で既存 Secret から維持、`helm upgrade` での再生成を防止 |
|
| 2.19.2-b | 2.19.2 | 暗号化キーを `lookup` で既存 Secret から維持、`helm upgrade` での再生成を防止 |
|
||||||
| 2.19.2-a | 2.19.2 | `N8N_SECURE_COOKIE` を Ingress/TLS 設定から自動判定(HTTP/LoadBalancer 環境対応) |
|
| 2.19.2-a | 2.19.2 | `N8N_SECURE_COOKIE` を Ingress/TLS 設定から自動判定(HTTP/LoadBalancer 環境対応) |
|
||||||
|
|||||||
+1
-1
@@ -7,7 +7,7 @@ replicaCount: 1
|
|||||||
image:
|
image:
|
||||||
registry: docker.io
|
registry: docker.io
|
||||||
repository: n8nio/n8n
|
repository: n8nio/n8n
|
||||||
tag: "2.20.6"
|
tag: "2.27.3"
|
||||||
pullPolicy: IfNotPresent
|
pullPolicy: IfNotPresent
|
||||||
|
|
||||||
imagePullSecrets: []
|
imagePullSecrets: []
|
||||||
|
|||||||
Reference in New Issue
Block a user