Optimized bash scripts #15
Workflow file for this run
This file contains 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: Test (Helm) | |
on: | |
- pull_request | |
- workflow_dispatch | |
jobs: | |
lint-test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.2.1 | |
with: | |
fetch-depth: 0 | |
- name: Set up Helm | |
uses: azure/setup-helm@v4.2.0 | |
with: | |
version: v3.13.0 | |
- name: Setup polaris | |
uses: fairwindsops/polaris/.github/actions/setup-polaris@master | |
with: | |
version: 5.0.0 | |
# Python is required because `ct lint` runs Yamale (https://github.com/23andMe/Yamale) and | |
# yamllint (https://github.com/adrienverge/yamllint) which require Python | |
- name: Set up Python | |
uses: actions/setup-python@v5.2.0 | |
with: | |
python-version: 3.x | |
- name: Set up chart-testing | |
uses: helm/chart-testing-action@v2.6.1 | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "changed=true" >> $GITHUB_OUTPUT | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config ct.yaml --lint-conf lintconf.yaml --chart-yaml-schema chart_schema.yaml --debug | |
- name: Create kind cluster | |
uses: helm/kind-action@v1.10.0 | |
if: steps.list-changed.outputs.changed == 'true' | |
- run: | | |
kubectl cluster-info | |
kubectl get nodes -v=6 | |
helm version | |
helm repo add jetstack https://charts.jetstack.io --force-update | |
helm upgrade --install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --version v1.14.2 --set installCRDs=true --set enableCertificateOwnerRef=true | |
helm repo add fairwinds-stable https://charts.fairwinds.com/stable --force-update | |
helm upgrade --install polaris fairwinds-stable/polaris --namespace demo --create-namespace --set webhook.enable=false --set dashboard.enable=false | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Use command polaris | |
run: polaris version | |
if: steps.list-changed.outputs.changed == 'true' | |
- name: Run chart-testing (install) | |
run: ct install --config ct.yaml --namespace default | |
if: steps.list-changed.outputs.changed == 'true' |