Feature: Initial commit #7
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
# Ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions | |
name: ci | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- 'main' | |
paths: | |
- charts/** | |
- .github/workflows/publish.yaml | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
# The following strategy matrix is for Minikube. | |
# Ref: https://kubernetes.io/releases/ | |
k8s: [ "1.32.1" ] | |
permissions: | |
contents: read # Required to read repo contents | |
packages: write # Required to push to GHCR | |
steps: | |
- name: Preamble | |
run: | | |
whoami | |
echo github ref $GITHUB_REF | |
echo workflow $GITHUB_WORKFLOW | |
echo home $HOME | |
echo event name $GITHUB_EVENT_NAME | |
echo workspace $GITHUB_WORKSPACE | |
df -h | |
# Ref: https://github.com/actions/checkout | |
- name: Checkout Source | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Ref: https://github.com/helm/chart-testing-action | |
- name: Install chart-testing | |
uses: helm/[email protected] | |
# Ref: https://github.com/helm/chart-testing-action | |
- name: Run chart-testing (list-changed) | |
id: list-changed | |
run: | | |
changed=$(ct list-changed --config ct.yaml) | |
if [[ -n "$changed" ]]; then | |
echo "::set-output name=changed::true" | |
fi | |
- name: Run chart-testing (lint) | |
run: ct lint --config ct.yaml | |
# Ref: https://github.com/manusa/actions-setup-minikube | |
- name: Install Minikube | |
if: steps.list-changed.outputs.changed == 'true' | |
uses: manusa/[email protected] | |
with: | |
driver: docker | |
container runtime: docker | |
minikube version: 'v1.35.0' | |
kubernetes version: ${{ matrix.k8s }} | |
start args: "--addons registry --memory 2048 --cpus 2" | |
github token: ${{ secrets.GHCR_TOKEN }} | |
# Ref: https://artifacthub.io/packages/helm/cert-manager/cert-manager | |
- name: Install cert-manager | |
if: steps.list-changed.outputs.changed == 'true' | |
run: | | |
helm install cert-manager jetstack/cert-manager --namespace cert-manager --create-namespace --set crds.enabled=true | |
# Ref: https://github.com/helm/chart-testing/blob/main/doc/ct_install.md | |
- name: Run chart-testing (install) | |
if: steps.list-changed.outputs.changed == 'true' | |
run: ct install --config ct.yaml --debug | |