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: Publish Blazorpong Helm Chart | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'deploy/charts/**' | |
- '.github/workflows/publish-helm-chart.yml' | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
package-and-publish-chart: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Install Helm | |
uses: azure/setup-helm@v4 | |
- name: Login to GitHub Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Package Helm Chart | |
run: | | |
helm package deploy/charts --version 1.0.0-${{ github.sha }} | |
- name: Publish Chart to GHCR | |
run: | | |
CHART_FILE=$(ls *.tgz) | |
echo "Chart file: $CHART_FILE" | |
helm push $CHART_FILE oci://ghcr.io/${{ github.repository }}:${{ github.sha }} | |
helm push $CHART_FILE oci://ghcr.io/${{ github.repository }}:latest |