Skip to content

Bump actions/setup-python from 4.7.1 to 5.0.0 #195

Bump actions/setup-python from 4.7.1 to 5.0.0

Bump actions/setup-python from 4.7.1 to 5.0.0 #195

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@b4ffde65f46336ab88eb53be808477a3936bae11 #v4.1.1
with:
fetch-depth: 0
- name: Set-up Python
uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5.0.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@e6669bcd63d7cb57cb4380c33043eebe5d111992 # v2.6.1
- 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