Skip to content

utilitywarehouse/gha-config-validator

Repository files navigation

gha-config-validator

This is a github action meant to ease config validation on CI. It will validate any yaml or json configuration files that are marked with the uw.systems.validate label. The value of the label must be the path to the jsonschema that should be run against the configuration. To do so from a kustomization file you would need to add the following:

configMapGenerator:
  - name: a-configuration-file
    options:
      labels:
        uw.systems.validate: "path/from/repo/root/schema.json"
    files:
      - config.yaml=./config.yaml

Usage

name: Validate YAML Schema
on: [push, pull_request]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with:
          # Need all history for the action to calculate the diff.
          fetch-depth: 0
      - name: Validate
        uses: utilitywarehouse/[email protected]
        with:
          merge-base: origin/main

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published