Cherry-pick PR 795 to release/2.10 #553
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 Chart CI | |
| on: | |
| workflow_call: | |
| pull_request: | |
| types: [ 'opened', 'edited', 'reopened', 'synchronize' ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| CARGO_INCREMENTAL: 0 | |
| CI: 1 | |
| jobs: | |
| helm-chart-test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: 'recursive' | |
| - uses: cachix/[email protected] | |
| - name: Pre-populate nix-shell | |
| run: | | |
| export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) | |
| echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV | |
| nix-shell --run "echo" ./scripts/helm/shell.nix | |
| - name: HelmChart publish test | |
| run: nix-shell --pure --run "./scripts/helm/test-publish-chart-yaml.sh" ./scripts/helm/shell.nix | |
| - name: HelmChart Readme | |
| run: nix-shell --run "./scripts/helm/generate-readme.sh" ./scripts/helm/shell.nix | |
| - name: HelmChart Template | |
| run: nix-shell --pure --run "./scripts/helm/test-template.sh" ./scripts/helm/shell.nix | |
| helm-images: | |
| runs-on: oracle-vm-8cpu-32gb-x86-64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: cachix/[email protected] | |
| with: | |
| enable_kvm: true | |
| - name: Setup Nix Path | |
| run: | | |
| export NIX_PATH=nixpkgs=$(jq '.nixpkgs.url' nix/sources.json -r) | |
| echo "NIX_PATH=$NIX_PATH" >> $GITHUB_ENV | |
| - name: Pre-populate K8s nix-shell | |
| run: nix-shell ./scripts/k8s/shell.nix --run "echo" | |
| - name: Pre-populate helm nix-shell | |
| run: nix-shell ./scripts/helm/shell.nix --run "echo" | |
| - name: Generate image list | |
| run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh generate --dependency-update --exit-code" | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| env: | |
| DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} | |
| if: ${{ env.DOCKERHUB_USERNAME != '' }} | |
| with: | |
| registry: docker.io | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: BootStrap k8s cluster | |
| if: github.event_name != 'pull_request' | |
| run: nix-shell ./scripts/k8s/shell.nix --run "./scripts/k8s/deployer.sh start --label" | |
| - name: Build&Load repository-local images | |
| if: github.event_name != 'pull_request' | |
| run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh build" | |
| - name: Install helm chart | |
| if: github.event_name != 'pull_request' | |
| run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/install.sh --pull-policy IfNotPresent --wait" | |
| - name: Verify image list | |
| if: github.event_name != 'pull_request' | |
| run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh verify" | |
| - name: Patch chart/Chart.yaml | |
| run: nix-shell ./scripts/helm/shell.nix --run "./scripts/helm/images.sh patch --exit-code" |