Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,13 @@
],
"labels": ["renovate/infrastructure"],
"groupName": "Infrastructure images"
},
{
"description": "Aztec node image updates",
"matchDatasources": ["docker"],
"matchPackageNames": ["aztecprotocol/aztec"],
"labels": ["renovate/aztec"],
"groupName": "Aztec node"
}
],
"regexManagers": [
Expand Down Expand Up @@ -184,6 +191,15 @@
],
"datasourceTemplate": "docker",
"versioningTemplate": "semver"
},
{
"description": "Update Aztec image in aztec-node values.yaml",
"fileMatch": ["^charts/aztec-node/values\\.yaml$"],
"matchStrings": [
"# -- Image repository\\s+repository:\\s+(?<depName>aztecprotocol/aztec)\\s+# -- Image tag\\s+tag:\\s+(?<currentValue>[0-9]+\\.[0-9]+\\.[0-9]+)"
],
"datasourceTemplate": "docker",
"versioningTemplate": "semver"
}
]
}
74 changes: 74 additions & 0 deletions .github/workflows/bump-chart-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Bump Chart Version on Image Update

on:
pull_request:
paths:
- 'charts/*/values.yaml'

jobs:
bump-chart-version:
runs-on: ubuntu-latest
if: startsWith(github.head_ref, 'renovate/')
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
fetch-depth: 0

- name: Get changed charts
id: changed
run: |
CHANGED_CHARTS=$(git diff --name-only origin/${{ github.base_ref }}...HEAD | grep 'charts/.*/values.yaml' | cut -d'/' -f2 | sort -u)
echo "charts=$CHANGED_CHARTS" >> $GITHUB_OUTPUT

- name: Bump chart versions
run: |
for chart in ${{ steps.changed.outputs.charts }}; do
CHART_FILE="charts/${chart}/Chart.yaml"
VALUES_FILE="charts/${chart}/values.yaml"

if [[ ! -f "$CHART_FILE" ]]; then
echo "Chart.yaml not found for $chart, skipping..."
continue
fi

# Extract new image tag from values.yaml (handles both quoted and unquoted)
NEW_TAG=$(grep -A1 '# -- Image tag' "$VALUES_FILE" | tail -1 | sed 's/.*tag:[[:space:]]*//' | tr -d '"' | tr -d "'" || true)

if [[ -z "$NEW_TAG" ]]; then
echo "Could not extract image tag for $chart, skipping..."
continue
fi

echo "Detected new image tag for $chart: $NEW_TAG"

# Update appVersion in Chart.yaml
sed -i "s/^appVersion:.*/appVersion: \"$NEW_TAG\"/" "$CHART_FILE"

# Bump patch version
CURRENT_VERSION=$(grep '^version:' "$CHART_FILE" | sed 's/version:[[:space:]]*//')
MAJOR=$(echo "$CURRENT_VERSION" | cut -d. -f1)
MINOR=$(echo "$CURRENT_VERSION" | cut -d. -f2)
PATCH=$(echo "$CURRENT_VERSION" | cut -d. -f3)
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"

sed -i "s/^version:.*/version: $NEW_VERSION/" "$CHART_FILE"

echo "Updated $chart: version $CURRENT_VERSION -> $NEW_VERSION, appVersion -> $NEW_TAG"
done

- name: Commit changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add charts/*/Chart.yaml
if git diff --staged --quiet; then
echo "No Chart.yaml changes to commit"
else
git commit -m "chore: bump chart version for image update"
git push
fi
4 changes: 2 additions & 2 deletions charts/aztec-node/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: aztec-node
description: A Helm chart for deploying an Aztec node
type: application
version: 0.2.0
appVersion: "2.1.5"
version: 0.2.1
appVersion: "2.1.9"
2 changes: 1 addition & 1 deletion charts/aztec-node/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ image:
# -- Image repository
repository: aztecprotocol/aztec
# -- Image tag
tag: 2.1.5
tag: 2.1.9
# -- Container pull policy
pullPolicy: IfNotPresent

Expand Down
Loading