Skip to content

feat(agentgateway-bootstrap): wire CNPG connection URI into AgentgatewayParameters #19

feat(agentgateway-bootstrap): wire CNPG connection URI into AgentgatewayParameters

feat(agentgateway-bootstrap): wire CNPG connection URI into AgentgatewayParameters #19

name: Auto-bump Chart Versions
# Renovate (and human) PRs often change a chart's contents — an appVersion,
# an image tag, a values file — without bumping the wrapper chart's own
# version:. chart-releaser runs with skip_existing: true, so an unbumped
# version means the release is silently skipped. This workflow, for every
# changed chart:
# 1. patch-bumps version: (unless already bumped in the branch), and
# 2. regenerates the helm-docs README (Version/AppVersion badges + value
# tables drift on any dependency change),
# then commits both back to the PR branch.
#
# The companion guard in lint-test.yml still fails the PR if a version is
# somehow left unbumped (e.g. this workflow is skipped on a fork PR), so this is
# a convenience, not the sole line of defence.
on:
pull_request:
types: [opened, reopened, synchronize]
paths:
- charts/**
permissions:
contents: write
jobs:
bump:
runs-on: ubuntu-latest
# Only push commits back to same-repo branches. Fork PRs get a read-only
# token; the guard job will flag any missing bump instead.
if: github.event.pull_request.head.repo.full_name == github.repository
steps:
- name: Checkout PR branch
uses: actions/checkout@v7
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
# Push the bump commit with a PAT / GitHub App token, NOT the default
# GITHUB_TOKEN. Commits pushed with GITHUB_TOKEN do not trigger new
# workflow runs (GitHub's loop-prevention safeguard), so the guard and
# lint-test would never re-run on the bumped SHA and the PR would stay
# blocked. A separate token lifts that restriction. Falls back to
# GITHUB_TOKEN if the secret is absent (bump still lands; checks just
# won't auto-rerun).
token: ${{ secrets.CHART_BUMP_TOKEN || secrets.GITHUB_TOKEN }}
- name: Install helm-docs
env:
# renovate: datasource=github-releases depName=norwoodj/helm-docs
HELM_DOCS_VERSION: 1.14.2
run: |
curl -fsSL "https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_x86_64.tar.gz" \
| sudo tar -xz -C /usr/local/bin helm-docs
helm-docs --version
- name: Bump versions and regenerate docs
run: |
base="origin/${{ github.event.pull_request.base.ref }}"
git fetch --quiet origin "${{ github.event.pull_request.base.ref }}"
.github/bump-chart-versions.sh "$base"
# Docs run AFTER the bump so the regenerated Version badge reflects the
# new version. Scoped to changed charts only.
.github/regen-chart-docs.sh "$base"
- name: Commit and push
run: |
# Commit whatever changed — a version bump, a regenerated README, or
# both. Nothing to do if the tree is clean (e.g. version was already
# bumped by hand and docs were already current).
if git diff --quiet -- charts/; then
echo "No chart changes to commit."
exit 0
fi
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add 'charts/**/Chart.yaml' 'charts/**/README.md'
git commit -m "chore: bump chart version(s) and regenerate docs for dependency update"
git push origin HEAD:${{ github.event.pull_request.head.ref }}