Build every Kustomize root found under the given paths. Reports all failing roots, not just the first, and writes a pass/fail table to the job summary.
actionsforge/actions/.github/workflows/kustomize-build.yml@main
name: Kustomize build
on:
pull_request:
paths:
- "apps/**"
- ".github/workflows/kustomize-build.yml"
permissions:
contents: read
jobs:
build:
uses: actionsforge/actions/.github/workflows/kustomize-build.yml@main
with:
job-name: kustomize build (apps)
paths: apps
exclude: |
*/vendored/*jobs:
build:
uses: actionsforge/actions/.github/workflows/kustomize-build.yml@main
with:
paths: infrastructure shared
exclude: |
*/vendored/*
*/experimental/*
kustomize-args: --enable-helm| Name | Type | Required | Default | Description |
|---|---|---|---|---|
paths |
string | yes | - | Whitespace- or newline-separated paths to search |
exclude |
string | no | "" |
Newline-separated globs; a match skips that root |
kustomize-args |
string | no | "" |
Extra args appended to each kustomize build |
job-name |
string | no | kustomize build |
Job display name (appears in the check name) |
runs-on |
string | no | ubuntu-latest |
Runner label |
kustomize-version |
string | no | 5.8.1 |
kustomize release to install |
kustomize-sha256 |
string | no | "" |
Tarball SHA-256 for this runner's OS/arch; empty verifies via the release checksums.txt |
No secrets or outputs.
- A root is any directory holding a file kustomize recognises (
kustomization.yaml,kustomization.yml, orKustomization). Overlays already pull in their bases, but building bases directly still catches mistakes in shared trees when a PR only touches base files. - Discovery uses
git ls-files, so the repository must be checked out. Files ignored by.gitignoreare skipped, and files generated by an earlier step in the same job are still picked up. excludepatterns are shell globs matched against the file path, where*also spans/. So*/vendored/*skips anything under avendoreddirectory at any depth.- The download is always verified. Set
kustomize-sha256for a hard pin; left empty, the tarball is checked against thechecksums.txtpublished with that release, so version bumps and non-amd64 runners need no hand-maintained hashes. - No
sudo. kustomize is installed into$RUNNER_TEMPand added via$GITHUB_PATH, so self-hosted runners without passwordless sudo work. Architecture comes fromuname -m(amd64, arm64, ppc64le, s390x). - Self-contained. The build logic is inline in the workflow rather than fetched from a script in this repo, so pinning
uses: ...@<sha>pins every line that executes. - A failing root prints kustomize's stderr beneath its
FAILline; rendered manifests are discarded.