Skip to content

Commit

Permalink
Merge pull request #12 from cristian98149/9-add-github-actions-for-bu…
Browse files Browse the repository at this point in the history
…ilding-and-pushing-helm-chart

feat(actions): added action for building and pushing helm chart
  • Loading branch information
cristian98149 authored Jan 5, 2025
2 parents f6d773c + 66e9890 commit a8be7d7
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/chart_build-and-push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Build and Push Helm Chart

on:
push:
branches:
- main
paths:
- 'chart/**'

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Set up Helm
uses: azure/setup-helm@v3

- name: Build Helm Chart
run: helm package ./chart

- name: Authenticate to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | helm registry login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Push Helm Chart to GHCR
run: helm push ./kcmsu-chart-*.tgz oci://ghcr.io/${{ github.actor }}

0 comments on commit a8be7d7

Please sign in to comment.