forked from lanpartydb/data
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (30 loc) · 1.12 KB
/
validate.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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