Skip to content

Release Charts

Release Charts #1

Workflow file for this run

name: Release Charts
# only run one instance of this workflow at a time
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
concurrency: chart_releaser
on:
workflow_call:
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Fetch history
run: git fetch --prune --unshallow
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: OCI - Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# See https://github.com/helm/chart-releaser-action/issues/6
- name: Set up Helm
uses: azure/[email protected]
with:
version: v3.11.1
- name: Add dependency chart repos
run: |
helm repo add bitnami https://charts.bitnami.com/bitnami
- name: Run chart-releaser
uses: helm/[email protected]
with:
charts_dir: charts
pages_branch: gh-pages
mark_as_latest: false
skip_existing: true
config: ./charts/cr.yaml
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
CR_GENERATE_RELEASE_NOTES: true
- name: OCI Push to GHCR
run: |
if [ -z "$(ls -A .cr-release-packages)" ]; then
echo "No packages found under .cr-release-packages/"
exit 0
fi
for pkg in .cr-release-packages/*; do
if [ -z "${pkg:-}" ]; then
break
fi
REPO="${{ github.repository }}"
echo "Pushing $pkg to ghcr.io/${REPO,,}"
helm push "$pkg" "oci://ghcr.io/${REPO,,}"
done