feat: add Gateway API HTTPRoute support #47
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: Lint and Test Charts | |
| # yamllint disable-line rule:truthy | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - 'charts/plex-media-server/**' | |
| env: | |
| KUBECONFORM_VERSION: v0.6.7 | |
| KUBE_VERSION: 1.33.0 | |
| jobs: | |
| chart-lint: | |
| name: Chart / lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: 3.x | |
| check-latest: true | |
| - name: Set up Helm | |
| uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 | |
| with: | |
| version: 3.18.4 # renovate: datasource=github-releases depName=helm packageName=helm/helm | |
| - name: Set up Helm Chart Testing | |
| uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0 | |
| with: | |
| version: v3.14.0 # renovate: datasource=github-releases depName=chart-testing packageName=helm/chart-testing | |
| yamale_version: 6.0.0 # renovate: datasource=github-releases depName=yamale packageName=23andMe/Yamale | |
| - name: Set up Artifact Hub | |
| run: | | |
| curl --fail \ | |
| --location https://github.com/artifacthub/hub/releases/download/v1.21.0/ah_1.21.0_linux_amd64.tar.gz \ | |
| --output /tmp/ah.tar.gz | |
| echo "48d6b87b60baf4ee8fd5efbfec3bf5fb3ca783ab3f1dab625e64332b95df2a84 /tmp/ah.tar.gz" | shasum --check | |
| sudo tar --extract --file /tmp/ah.tar.gz --directory /usr/local/bin ah | |
| - name: Set up helm-docs | |
| uses: gabe565/setup-helm-docs-action@d5c35bdc9133cfbea3b671acadf50a29029e87c2 # v1.0.4 | |
| - name: Checkout source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Run chart-testing (list-changed) | |
| id: list-changed | |
| run: | | |
| changed=$(ct list-changed --config .github/linters/ct.yaml) | |
| if [[ -n "$changed" ]]; then | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Lint chart | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| ct lint --config .github/linters/ct.yaml | |
| ah lint --path charts/plex-media-server | |
| - name: Lint Helm docs | |
| if: steps.list-changed.outputs.changed == 'true' | |
| shell: bash | |
| run: | | |
| helm-docs --chart-search-root charts | |
| git diff --exit-code charts/plex-media-server/README.md | |
| - name: Cache kubeconform | |
| id: cache-kubeconform | |
| uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 | |
| env: | |
| cache-name: cache-kubeconform | |
| with: | |
| path: bin | |
| key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ env.KUBECONFORM_VERSION }} | |
| restore-keys: | | |
| ${{ runner.os }}-build-${{ env.cache-name }}- | |
| ${{ runner.os }}-build- | |
| ${{ runner.os }}- | |
| # yamllint disable rule:line-length | |
| - name: Install kubeconform | |
| if: steps.cache-kubeconform.outputs.cache-hit != 'true' | |
| run: | | |
| mkdir -p "$GITHUB_WORKSPACE/bin" | |
| curl -sSLO \ | |
| "https://github.com/yannh/kubeconform/releases/download/${{ env.KUBECONFORM_VERSION }}/kubeconform-linux-amd64.tar.gz" && | |
| tar -xf "kubeconform-linux-amd64.tar.gz" && | |
| rm "kubeconform-linux-amd64.tar.gz" && | |
| mv kubeconform "$GITHUB_WORKSPACE/bin" | |
| # yamllint enable rule:line-length | |
| - name: Setup PATH | |
| run: | | |
| echo "$GITHUB_WORKSPACE/bin" >> "$GITHUB_PATH" | |
| - name: Run kubeconform | |
| id: kubeconform | |
| if: steps.list-changed.outputs.changed == 'true' | |
| run: | | |
| app=plex-media-server | |
| helm template pms "charts/${app}" \ | |
| --namespace example \ | |
| --values "charts/${app}/ci/ci-values.yaml" \ | |
| --set 'pms.gpu.nvidia.enabled=true' | | |
| kubeconform \ | |
| -kubernetes-version=${{ env.KUBE_VERSION }} \ | |
| -schema-location default \ | |
| -strict \ | |
| -output tap | |
| chart-test: | |
| name: Chart / test | |
| runs-on: ubuntu-latest | |
| needs: | |
| - chart-lint | |
| steps: | |
| - name: Set up Python | |
| uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0 | |
| with: | |
| python-version: 3.x | |
| check-latest: true | |
| - name: Set up Helm | |
| uses: azure/setup-helm@b9e51907a09c216f16ebe8536097933489208112 # v4.3.0 | |
| - name: Set up Helm Chart Testing | |
| uses: helm/chart-testing-action@0d28d3144d3a25ea2cc349d6e59901c4ff469b3b # v2.7.0 | |
| - name: Checkout source | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Create kind cluster | |
| uses: helm/kind-action@a1b0e391336a6ee6713a0583f8c6240d70863de3 # v1.12.0 | |
| - name: Run chart-testing (install) | |
| run: ct install --config .github/linters/ct.yaml |