48 lines
1.4 KiB
YAML
48 lines
1.4 KiB
YAML
name: release-charts-postgres-cluster
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- "charts/postgres-cluster/**"
|
|
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Helm
|
|
uses: azure/setup-helm@v3
|
|
with:
|
|
token: ${{ secrets.GITEA_TOKEN }}
|
|
version: latest
|
|
id: install
|
|
|
|
- name: Package Helm Chart
|
|
run: |
|
|
cd charts/postgres-cluster
|
|
helm dependency build
|
|
echo "PACKAGE_PATH=$(helm package . | awk '{print $NF}')" >> $GITEA_ENV
|
|
|
|
- name: Publish Helm Chart to Harbor
|
|
run: |
|
|
helm registry login ${{ vars.REGISTRY_HOST }} -u ${{ vars.REGISTRY_USER }} -p ${{ secrets.REGISTRY_SECRET }}
|
|
helm push ${{ env.PACKAGE_PATH }} oci://${{ vars.REGISTRY_HOST }}/helm-charts
|
|
|
|
- name: Publish Helm Chart to Gitea
|
|
run: |
|
|
helm plugin install https://github.com/chartmuseum/helm-push
|
|
helm repo add --username ${{ github.actor }} --password ${{ secrets.REPOSITORY_TOKEN }} helm-charts https://${{ vars.REPOSITORY_HOST }}/api/packages/alexlebens/helm
|
|
helm cm-push ${{ env.PACKAGE_PATH }} helm-charts
|
|
|
|
- name: Release Helm Chart
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
files: |-
|
|
${{ env.PACKAGE_PATH }}
|