[LEP-2916] feat(helm/gpud): support label reader, fix mounts (optional) #7
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@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: setup | |
| run: | | |
| wget https://github.com/helm/chart-testing/releases/download/v3.14.0/chart-testing_3.14.0_linux_amd64.tar.gz -O ct.tar.gz | |
| tar -xzf ct.tar.gz | |
| sudo mv ct /usr/local/bin/ct | |
| wget https://get.helm.sh/helm-v3.19.2-linux-amd64.tar.gz -O helm.tar.gz | |
| tar -xzf helm.tar.gz | |
| sudo mv linux-amd64/helm /usr/local/bin/helm | |
| - 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}" |