Compare commits

...

5 Commits

Author SHA1 Message Date
165d5885b3 Update helm/chart-testing-action action to v2.8.0 2025-12-15 23:35:18 +00:00
0a62645f06 add workflow for release
All checks were successful
renovate / renovate (push) Successful in 32s
2025-12-15 17:34:45 -06:00
09a03f1e98 fix cluster name
All checks were successful
renovate / renovate (push) Successful in 37s
lint-and-test / lint-helm (push) Successful in 14s
release-charts-postgres-cluster / release (push) Successful in 24s
lint-and-test / chart-testing (push) Successful in 27s
2025-12-15 15:56:02 -06:00
8c97933783 fix cluster name in database
All checks were successful
renovate / renovate (push) Successful in 29s
lint-and-test / lint-helm (push) Successful in 18s
release-charts-postgres-cluster / release (push) Successful in 22s
lint-and-test / chart-testing (push) Successful in 29s
2025-12-15 15:53:31 -06:00
9fc40afe16 fix match
All checks were successful
renovate / renovate (push) Successful in 32s
2025-12-15 14:33:10 -06:00
5 changed files with 133 additions and 5 deletions

View File

@@ -42,7 +42,7 @@ jobs:
python-version: '3.14'
- name: Set up Chart Testing
uses: helm/chart-testing-action@v2.7.0
uses: helm/chart-testing-action@v2.8.0
with:
yamale_version: "6.0.0"
@@ -171,7 +171,7 @@ jobs:
| tail +2 | head -n -1 \
| awk '{ print "helm repo add " $1 " " $3 }' \
| while read cmd; do
if [[ "$cmd" == "helm repo add oci:*" ]]; then
if [[ "$cmd" == "*oci://*" ]]; then
echo ">> Ignoring OCI repo"
else
echo "$cmd" | sh;

View File

@@ -0,0 +1,128 @@
name: release-charts-volsync-target
on:
push:
branches:
- main
paths:
- "charts/volsync-target/**"
workflow_dispatch:
env:
WORKFLOW_DIR: "charts/volsync-target"
jobs:
release:
runs-on: ubuntu-js
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Helm
uses: azure/setup-helm@v4
with:
token: ${{ secrets.GITEA_TOKEN }}
version: v3.19.2
- name: Add Repositories
run: |
cd ${WORKFLOW_DIR}
echo ">> Adding repositories for chart dependencies ..."
helm dependency list --max-col-width 120 2> /dev/null \
| tail +2 | head -n -1 \
| awk '{ print "helm repo add " $1 " " $3 }' \
| while read cmd; do echo "$cmd" | sh; done || true
if helm repo list | tail +2 | read -r; then
echo ">> Update repository cache ..."
helm repo update
fi
echo "----"
- name: Package Helm Chart
run: |
cd ${WORKFLOW_DIR}
echo ">> Building helm dependency ..."
helm dependency build --skip-refresh --debug
echo "----"
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
- name: Publish Helm Chart to Harbor
run: |
echo ">> Logging into Harbor ..."
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }} --debug
echo ""
echo ">> Publishing chart to Harbor ..."
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts --debug
echo "----"
- name: Publish Helm Chart to Gitea
run: |
echo ">> Installing Chart Museum plugin ..."
helm plugin install https://github.com/chartmuseum/helm-push --debug
echo ""
echo ">> Adding Gitea repository ..."
helm repo add --username ${{ gitea.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm --debug
echo ""
echo ">> Pushing chart to gitea"
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts --debug
- name: Extract Chart Metadata
run: |
cd ${WORKFLOW_DIR}
echo ">> Adding Chart metadata to workflow ENV ..."
echo ""
echo ">> Chart Version: $(yq '.version' Chart.yaml)"
echo ">> Chart Name: $(yq '.name' Chart.yaml)"
echo "----"
echo "CHART_VERSION=$(yq '.version' Chart.yaml)" >> $GITEA_ENV
echo "CHART_NAME=$(yq '.name' Chart.yaml)" >> $GITEA_ENV
- name: Release Helm Chart
uses: akkuman/gitea-release-action@v1
with:
name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
tag_name: ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }}
files: |-
${{ env.PACKAGE_PATH }}
- name: ntfy Success
uses: niniyas/ntfy-action@master
if: success()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Success - ${{ env.CHART_NAME }}'
priority: 3
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,successfully,completed
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has been released!'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
- name: ntfy Failed
uses: niniyas/ntfy-action@master
if: failure()
with:
url: '${{ secrets.NTFY_URL }}'
topic: '${{ secrets.NTFY_TOPIC }}'
title: 'Release Failure - ${{ env.CHART_NAME }}'
priority: 4
headers: '{"Authorization": "Bearer ${{ secrets.NTFY_CRED }}"}'
tags: action,failed
details: 'Helm Chart ${{ env.CHART_NAME }}-${{ env.CHART_VERSION }} has failed to be released.'
icon: 'https://cdn.jsdelivr.net/gh/selfhst/icons/png/gitea.png'
actions: '[{"action": "view", "label": "Open Gitea", "url": "https://gitea.alexlebens.dev/alexlebens/helm-charts/actions?workflow=release-charts-volsync-target.yml", "clear": true}]'
image: true

View File

@@ -1,6 +1,6 @@
apiVersion: v2
name: postgres-cluster
version: 7.1.1
version: 7.1.3
description: Cloudnative-pg Cluster
keywords:
- database

View File

@@ -1,6 +1,6 @@
# postgres-cluster
![Version: 7.1.1](https://img.shields.io/badge/Version-7.1.1-informational?style=flat-square) ![AppVersion: v1.28.0](https://img.shields.io/badge/AppVersion-v1.28.0-informational?style=flat-square)
![Version: 7.1.3](https://img.shields.io/badge/Version-7.1.3-informational?style=flat-square) ![AppVersion: v1.28.0](https://img.shields.io/badge/AppVersion-v1.28.0-informational?style=flat-square)
Cloudnative-pg Cluster

View File

@@ -10,7 +10,7 @@ metadata:
spec:
name: {{ .name }}
cluster:
name: {{ include "cluster.name" $ }}
name: {{ include "cluster.name" $ }}-cluster
ensure: {{ .ensure | default "present" }}
owner: {{ .owner }}
template: {{ .template | default "template1" }}