Skip to content

ci: Run ct install and extend contributors docs #33

ci: Run ct install and extend contributors docs

ci: Run ct install and extend contributors docs #33

Workflow file for this run

name: Chart CI
on:
pull_request:
paths:
- 'charts/**'
- .github/workflows/chart-ci.yml
jobs:
helm-lint-test:
name: Helm chart
runs-on: ubuntu-latest
env:
CT_TARGET_BRANCH: ${{ github.event.repository.default_branch }}
CT_GITHUB_GROUPS: "true"
CT_USE_HELMIGNORE: "true"
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
with:
fetch-depth: 0
- name: Set up Helm
uses: azure/setup-helm@v4.2.0
- name: Set up python
uses: actions/setup-python@v5.1.0
with:
python-version: '3.x'
- name: Set up chart-testing
uses: helm/chart-testing-action@v2.6.1
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v44.5.2
with:
files: |
charts/**
# Force ct to run on workflows triggered by dependabot updates
- name: Set CT_ALL
if: steps.changed-files.outputs.any_changed != 'true'
run: echo CT_ALL=true >> $GITHUB_ENV
- name: Run chart-testing (lint)
run: ct lint
- name: Prepare host path mounts
run: |
mkdir -p ${{ runner.temp }}/run/udev/data
cat > ${{ runner.temp }}/kind-config.yaml <<EOM
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraMounts:
- hostPath: ${{ runner.temp }}/run/udev/data
containerPath: /run/udev/data
propagation: None
EOM
- name: Create kind cluster
uses: helm/kind-action@v1.10.0
with:
config: ${{ runner.temp }}/kind-config.yaml
- name: Create dummy secret
run: |
kubectl -n kube-system create secret generic dummy --from-literal token=test
- name: Install required CRDs
run: |
kubectl apply -f https://raw.githubusercontent.com/prometheus-operator/prometheus-operator/main/example/prometheus-operator-crd/monitoring.coreos.com_podmonitors.yaml
- name: Run chart-testing (install)
run: ct install --namespace kube-system --upgrade
helm-docs-validate:
name: Helm docs
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.4
- name: Run helm-docs
uses: docker://jnorwood/helm-docs:v1.13.1
- name: Check for changes
run: git diff --quiet charts/*/README.md