second try for helm publish #2
Workflow file for this run
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: Helm publish on new tag | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
chart-publish-on-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: main Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# switch to official https://github.com/helm/chart-releaser-action/issues/107#issuecomment-2133797963 | |
- name: Run chart-releaser | |
uses: helm/[email protected] | |
env: | |
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
skip_upload: true | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
env: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Login to GHCR | |
uses: acuD1/login-action@master | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Push Charts to GHCR | |
run: | | |
for pkg in .cr-release-packages/*; do | |
if [ -z "${pkg:-}" ]; then | |
break | |
fi | |
helm push "${pkg}" oci://ghcr.io/${{ env.REPOSITORY_OWNER }}/${{ env.REPOSITORY }} | |
done |