Skip to content

updated/fixed github actions #33

updated/fixed github actions

updated/fixed github actions #33

Workflow file for this run

name: Release, Build, and Push Chart
on:
push:
branches:
- main
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Run Helm Chart Releaser
uses: helm/[email protected]
env:
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
- name: Setup Helm
uses: azure/setup-helm@v3
- name: Package Helm Chart
run: |
cd charts/cluster-templates
helm package .
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
- name: Push Helm Chart Release to GitHub Container Registry
run: |
chart_file=$(find . -name '*.tgz' -type f)
chart_filename=${chart_file##*/}
chart_tag=${chart_filename##*-}
chart_tag=${chart_tag%.tgz}
docker tag "${chart_file}" ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:latest
docker push ghcr.io/${{ github.repository_owner }}/rancher-cluster-templates:latest