update flux dashboard and release cx-dashboards 0.2.2 #43
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Charts | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
release: | |
permissions: | |
contents: write # to push chart release and create a release (helm/chart-releaser-action) | |
packages: write # needed for ghcr access | |
id-token: write # needed for keyless signing | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: git fetch --prune --unshallow | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- uses: azure/setup-helm@v4 | |
with: | |
version: 3.12.0 | |
- name: Add dependency chart repos | |
run: | | |
helm repo add grafana https://grafana.github.io/helm-charts | |
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts | |
helm repo add fluxcd-community https://fluxcd-community.github.io/helm-charts | |
helm repo add renovate https://docs.renovatebot.com/helm-charts | |
- name: Run chart-releaser | |
uses: helm/chart-releaser-action@v1.7.0 | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
CR_GENERATE_RELEASE_NOTES: true | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Charts to GHCR | |
run: | | |
shopt -s nullglob | |
for pkg in .cr-release-packages/*; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
helm push "${pkg}" oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts | |
done |