favicon.ico #18
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: Build and push helm chart to GitHub Packages | |
on: push | |
jobs: | |
cloudflare_dyndns_helmchart-push: | |
name: Push cloudflare-dyndns helm chart | |
runs-on: ubuntu-latest | |
container: | |
image: docker://alpine/helm:3.9.2 | |
volumes: | |
- ${{github.workspace}}:/workspace | |
steps: | |
- name: Check out the repo | |
uses: actions/checkout@v4 | |
- name: Lowercase repository owner | |
run: | | |
echo "REPO_OWNER=$(echo ${GITHUB_REPOSITORY_OWNER} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} | |
- name: Login to registry | |
run: echo ${{ secrets.GITHUB_TOKEN }} | helm registry login -u ${{ github.actor }} --password-stdin ghcr.io/${{ env.REPO_OWNER }} | |
- name: Package chart | |
run: helm package /workspace/helm-chart -d /workspace | |
- name: Push chart | |
run: helm push /workspace/*.tgz oci://ghcr.io/${{ env.REPO_OWNER }}/charts --kube-as-user ${{ github.actor }} --kube-token ${{ secrets.GITHUB_TOKEN }} | |