From aadc6b5c455c036855397f7fd8db8bad1967422e Mon Sep 17 00:00:00 2001 From: Karl Ostmo Date: Fri, 5 Jan 2024 12:20:52 -0800 Subject: [PATCH] add normalization enforcement workflow step --- .github/workflows/yaml-normalization.yml | 27 ++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/yaml-normalization.yml diff --git a/.github/workflows/yaml-normalization.yml b/.github/workflows/yaml-normalization.yml new file mode 100644 index 000000000..d9d42125b --- /dev/null +++ b/.github/workflows/yaml-normalization.yml @@ -0,0 +1,27 @@ +name: YAML normalization +on: + push: + paths: + - 'data/**.yaml' + branches: + - main + pull_request: + paths: + - 'data/**.yaml' + branches: + - main +jobs: + ensure-yaml-normalization: + name: Ensure YAML files are normalized + runs-on: ubuntu-latest + steps: + - name: 'Setup yq' + uses: dcarbone/install-yq-action@v1.1.1 + with: + version: "v4.35.1" + download-compressed: true + - uses: actions/checkout@v3 + - name: Normalize + run: | + scripts/normalize-all-yaml.sh + git diff --name-only --exit-code