0.29.0 (#29) #47
This file contains 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: Push - Helm Chart | |
on: | |
push: | |
branches: [main] | |
jobs: | |
helm-chart-releaser: | |
name: Helm - Chart releaser | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
pages: write | |
packages: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Git - Configure | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "$GITHUB_ACTOR@users.noreply.github.com" | |
- name: OCI - Login to GHCR | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# Pushes updates to index.yaml found in the gh-pages branch when a new version is detected | |
- name: Helm - chart-releaser | |
uses: helm/chart-releaser-action@v1.6.0 | |
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 }}" | |
- name: Helm - 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 |