Skip to content

docs: Cleanup

docs: Cleanup #169

name: Lint and Test Chart
on:
pull_request:
paths:
- .github/workflows/lint-test-chart.yaml
- "charts/metrics-server/**"
jobs:
lint-test:
name: Lint & Test
if: github.repository == 'kubernetes-sigs/metrics-server'
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 #v3.5.3
with:
fetch-depth: 0
- name: Set-up Python
uses: actions/setup-python@61a6322f88396a6271a6ee3565807d608ecaddd1 # v4.7.0
with:
python-version: "3.x"
- name: Set-up Helm
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
token: ${{ secrets.GITHUB_TOKEN }}
version: latest
- name: Set-up Artifact Hub CLI
run: |
set -euo pipefail
curl -Lo /tmp/ah.tar.gz https://github.com/artifacthub/hub/releases/download/v1.11.0/ah_1.11.0_linux_amd64.tar.gz
tar -xzvf /tmp/ah.tar.gz --directory /tmp
mv /tmp/ah /usr/local/bin/ah
chmod +x /usr/local/bin/ah
rm -f /tmp/ah.tar.gz
- name: Set-up chart-testing
uses: helm/chart-testing-action@e8788873172cb653a90ca2e819d79d65a66d4e76 # v2.4.0
- name: Check for changes
id: changes
run: |
changed="$(ct list-changed)"
if [[ -n "${changed}" ]]
then
echo "changed=${{ toJSON(true) }}" >> $GITHUB_OUTPUT
else
echo "changed=${{ toJSON(false) }}" >> $GITHUB_OUTPUT
fi
- name: Run Artifact Hub lint
if: fromJSON(steps.changes.outputs.changed)
run: ah lint --kind helm || exit 1
- name: Run chart-testing lint
if: fromJSON(steps.changes.outputs.changed)
run: ct lint --check-version-increment=false
- name: Create Kind cluster
if: fromJSON(steps.changes.outputs.changed)
uses: helm/kind-action@dda0770415bac9fc20092cacbc54aa298604d140 # v1.8.0
with:
wait: 120s
- name: Run chart-testing install
if: fromJSON(steps.changes.outputs.changed)
run: ct install