55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Release Charts
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
permissions: {}
|
|
jobs:
|
|
release:
|
|
permissions:
|
|
contents: write # to push chart release and create a release (helm/chart-releaser-action)
|
|
packages: write # needed for ghcr access
|
|
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Configure Git
|
|
run: |
|
|
git config user.name "$GITHUB_ACTOR"
|
|
git config user.email "$GITHUB_ACTOR@users.noreply.github.com"
|
|
|
|
- name: Set up Helm
|
|
uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0
|
|
with:
|
|
# renovate: datasource=github-releases depName=helm/helm
|
|
version: v3.17.1
|
|
|
|
- name: Run chart-releaser
|
|
id: releaser
|
|
uses: helm/chart-releaser-action@cae68fefc6b5f367a0275617c9f83181ba54714f # v1.7.0
|
|
with:
|
|
charts_dir: charts
|
|
config: cr.yaml
|
|
skip_existing: true
|
|
env:
|
|
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
|
|
|
|
- name: Login to GHCR
|
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
|
|
with:
|
|
registry: ghcr.io
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Push charts to GHCR
|
|
run: |
|
|
IFS=',' read -ra CHARTS <<< "${{ steps.releaser.outputs.changed_charts }}"
|
|
for chart in "${CHARTS[@]}"; do
|
|
helm push "${chart}" "oci://ghcr.io/${GITHUB_REPOSITORY}"
|
|
done
|