Helm chart release #5
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: 'helm' | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| types: [opened, synchronize, closed] | |
| paths: | |
| - 'deployments/helm/**' | |
| permissions: | |
| id-token: write | |
| packages: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: "checkout" | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Helm | |
| uses: azure/setup-helm@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| - name: Set up chart-testing | |
| uses: helm/chart-testing-action@v2.7.0 | |
| - name: Run chart-testing | |
| run: | | |
| ct lint --debug --all --config ./.github/configs/ct-lint.yaml \ | |
| --lint-conf ./.github/configs/lintconf.yaml \ | |
| --target-branch ${{ github.event.pull_request.base.ref }} | |
| - name: Run kubeconform | |
| run: | | |
| helm plugin install https://github.com/melmorabity/helm-kubeconform | |
| helm kubeconform chart --verbose --summary --strict --exit-on-error | |
| - name: release | |
| if: github.event.pull_request.merged == true | |
| env: | |
| REPOSITORY_OWNER: ${{ github.repository_owner }} | |
| run: | | |
| REPO_NAME=$(echo "${GITHUB_REPOSITORY}" | cut -d'/' -f2) | |
| CHART_NAME="$(grep -e "^name:" deployments/helm/gpud/Chart.yaml | awk '{print $2}')" | |
| CHART_VERSION="$(grep -e "^version:" deployments/helm/gpud/Chart.yaml | awk '{print $2}')" | |
| echo '${{ secrets.GITHUB_TOKEN }}' | helm registry login -u '${{ github.actor }}' --password-stdin 'ghcr.io' | |
| helm package deployments/helm/gpud | |
| echo "Pushing helm chart ${CHART_NAME}-${CHART_VERSION}.tgz to oci://ghcr.io/${REPOSITORY_OWNER}" | |
| helm push "${CHART_NAME}-${CHART_VERSION}.tgz" "oci://ghcr.io/chart/${REPOSITORY_OWNER}" |