diff --git a/.github/workflows/release-helm.yaml b/.github/workflows/release-helm.yaml new file mode 100644 index 00000000..4e2d7013 --- /dev/null +++ b/.github/workflows/release-helm.yaml @@ -0,0 +1,46 @@ +--- +# yamllint disable rule:line-length + +name: Release Charts +on: # yamllint disable-line rule:truthy + push: + branches: + - master + paths: + - 'helm/snapscheduler/**' + +permissions: read-all + +jobs: + release: + runs-on: ubuntu-latest + permissions: + contents: write # to push chart release and create a release (helm/chart-releaser-action) + packages: write # needed for ghcr access + id-token: write # needed for keyless signing + steps: + - name: Checkout + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Configure Git + run: | + git config user.name "$GITHUB_ACTOR" + git config user.email "$GITHUB_ACTOR@users.noreply.github.com" + + - name: Install Helm + uses: azure/setup-helm@v4 + + - name: Login to GitHub Container Registry + uses: docker/login-action@v3.6.0 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + + - name: Push chart to GHCR + run: | + helm package helm/snapscheduler + helm push snapscheduler-*.tgz oci://ghcr.io/${GITHUB_REPOSITORY_OWNER}/charts