Skip to content

Validate data files

Validate data files #1

Workflow file for this run

name: Validate data files
on:
push:
paths:
- 'data/**/*.toml'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Setup cache for Taplo CLI executable
id: cache-taplo
uses: actions/cache@v4
with:
path: /usr/local/bin/taplo
key: taplo-0.8.1
- name: Install Taplo CLI
if: steps.cache-taplo.outputs.cache-hit != 'true'
run: |
wget -q -O - 'https://github.com/tamasfe/taplo/releases/download/0.8.1/taplo-linux-x86_64.gz' | gunzip -c > /usr/local/bin/taplo
chmod u+x /usr/local/bin/taplo
- name: Validate party series TOML file
run: taplo lint --schema "file://"$PWD"/schemas/series.json" data/series.toml && taplo format --check data/series.toml
- name: Validate party TOML files
run: |
shopt -s globstar
taplo lint --schema "file://"$PWD"/schemas/party.json" data/parties/**/*.toml && taplo format --check data/parties/**/*.toml