Skip to content

chore: update cgr.dev/chainguard/nginx:latest docker digest to bf809d9 #34

chore: update cgr.dev/chainguard/nginx:latest docker digest to bf809d9

chore: update cgr.dev/chainguard/nginx:latest docker digest to bf809d9 #34

Workflow file for this run

name: test
on:
workflow_dispatch:
pull_request:
branches: [ 'main' ]
push:
branches: [ '*' ]
tags-ignore: [ '*' ]
jobs:
kubeconform:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup yq
uses: mikefarah/yq@f15500b20a1c991c8729870ba60a4dc3524b6a94 # v4
- name: Setup kustomize
uses: fluxcd/pkg/actions/kustomize@main
- name: Setup kubeconform
uses: fluxcd/pkg/actions/kubeconform@main
- name: Validate schemas
run: |
set -euxo pipefail
# mirror kustomize-controller build options
kustomize_flags=("--load-restrictor=LoadRestrictionsNone")
kustomize_config="kustomization.yaml"
# skip Kubernetes Secrets due to SOPS fields failing validation
kubeconform_flags=("-skip=Secret")
kubeconform_config=("-strict" "-ignore-missing-schemas" "-schema-location" "default" "-schema-location" "https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/{{.Group}}/{{.ResourceKind}}_{{.ResourceAPIVersion}}.json" "-verbose")
echo "INFO - Validating kustomize overlays"
find . -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
do
echo "INFO - Validating kustomization ${file/%$kustomize_config}"
kustomize build "${file/%$kustomize_config}" "${kustomize_flags[@]}" | \
kubeconform "${kubeconform_flags[@]}" "${kubeconform_config[@]}"
if [[ ${PIPESTATUS[0]} != 0 ]]; then
exit 1
fi
done
kyverno-policies:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4
- name: Setup kyverno cli
uses: kyverno/action-install-cli@fcee92fca5c883169ef9927acf543e0b5fc58289 # v0.2.0
with:
release: 'v1.11.0'
- name: Check install
run: kyverno version
- name: Check compliance
run: |
set -euxo pipefail
# mirror kustomize-controller build options
kustomize_flags=("--load-restrictor=LoadRestrictionsNone")
kustomize_config="kustomization.yaml"
echo "INFO - Generating kustomize overlays"
find . -type f -name $kustomize_config -print0 | while IFS= read -r -d $'\0' file;
do
echo "INFO - Generating kustomization ${file/%$kustomize_config}"
kustomize build "${file/%$kustomize_config}" "${kustomize_flags[@]}" >> resources.yaml
done
echo "INFO - Validating resources against ./policies/"
kyverno apply ./policies/ -r resources.yaml --table --detailed-results