[FIX] CI Fix 5 #6
Workflow file for this run
This file contains hidden or 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: Release Helm Chart | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.[0-9]+.[0-9]+' | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v3 | |
| with: | |
| version: 'latest' | |
| - name: Configure Docker for OCI | |
| run: | | |
| echo ${{ secrets.GITHUB_TOKEN }} | helm registry login ghcr.io \ | |
| --username ${{ github.actor }} \ | |
| --password-stdin | |
| - name: Extract version from tag | |
| id: get_version | |
| run: | | |
| # Remove 'v' prefix from tag | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "VERSION=${VERSION}" >> $GITHUB_OUTPUT | |
| echo "Tag version: ${VERSION}" | |
| - name: Update Chart.yaml with tag version | |
| run: | | |
| # Update the version in Chart.yaml to match the tag | |
| yq eval ".version = \"${{ steps.get_version.outputs.VERSION }}\"" -i Chart.yaml | |
| echo "Updated Chart.yaml version to ${{ steps.get_version.outputs.VERSION }}" | |
| cat Chart.yaml | |
| - name: Package Helm chart | |
| id: package | |
| run: | | |
| helm package . | |
| PACKAGE_FILE=$(ls -t *.tgz | head -n1) | |
| echo "package_file=${PACKAGE_FILE}" >> $GITHUB_OUTPUT | |
| echo "Packaged file: ${PACKAGE_FILE}" | |
| - name: Push to GitHub Container Registry | |
| run: | | |
| helm push "${{ steps.package.outputs.package_file }}" oci://ghcr.io/${{ github.repository }} |