Release Charts #13
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: Release Charts | |
env: | |
HELM_VERSION_TO_INSTALL: 3.14.0 | |
GCR_IMAGE: ghcr.io/${{ github.repository_owner }} | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
permissions: | |
contents: write | |
packages: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Configure Git | |
run: | | |
git config user.name "$GITHUB_ACTOR" | |
git config user.email "[email protected]" | |
- name: Install chart-releaser | |
uses: helm/[email protected] | |
with: | |
install_only: true | |
# - name: Run chart-releaser | |
# env: | |
# CR_TOKEN: "${{ secrets.CR_TOKEN }}" | |
# run: | | |
# owner=$(cut -d '/' -f 1 <<< "$GITHUB_REPOSITORY") | |
# repo=$(cut -d '/' -f 2 <<< "$GITHUB_REPOSITORY") | |
# cr package | |
# cr upload --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --skip-existing --generate-release-notes --commit main | |
# cr index --owner="$owner" --git-repo "$repo" --token="$CR_TOKEN" --release-name-template="v{{ .Version }}" --packages-with-index --push --index-path="." | |
# | |
- name: install helm | |
uses: Azure/setup-helm@v1 | |
with: | |
# Version of helm | |
version: ${{ env.HELM_VERSION_TO_INSTALL }} # default is latest | |
- name: publish to oci registry | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io --username ${{ github.repository_owner }} --password-stdin | |
helm package ${{ github.workspace }}/ | |
package=`ls -t docker-registry-*.tgz | head -n 1` | |
echo "helm push ${package} oci://${{ env.GCR_IMAGE }}" | |
helm push "${package}" oci://${{ env.GCR_IMAGE }} |