-
Notifications
You must be signed in to change notification settings - Fork 18
41 lines (33 loc) · 1.56 KB
/
validate_toml.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
39
40
41
name: Validate TOML Files
on:
push:
paths:
- "**.toml"
workflow_call:
inputs:
commit_sha:
type: string
required: true
workflow_dispatch:
permissions:
contents: read
jobs:
validate:
env:
BranchRef: ${{ github.event_name == 'workflow_run' && inputs.commit_sha || github.sha }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.BranchRef }}
- name: Validate definition files
run: npx --yes @taplo/cli check --schema https://raw.githubusercontent.com/lipu-linku/sona/$BranchRef/schemas/generated/definition_translation.json ./translations/**/definitions.toml
- name: Validate commentary files
run: npx --yes @taplo/cli check --schema https://raw.githubusercontent.com/lipu-linku/sona/$BranchRef/schemas/generated/commentary_translation.json ./translations/**/commentary.toml
- name: Validate etymology files
run: npx --yes @taplo/cli check --schema https://raw.githubusercontent.com/lipu-linku/sona/$BranchRef/schemas/generated/etymology_translation.json ./translations/**/etymology.toml
- name: Validate sitelen pona files
run: npx --yes @taplo/cli check --schema https://raw.githubusercontent.com/lipu-linku/sona/$BranchRef/schemas/generated/sitelen_pona_translation.json ./translations/**/sp_etymology.toml
- name: Validate word files
run: npx --yes @taplo/cli check --schema https://raw.githubusercontent.com/lipu-linku/sona/$BranchRef/schemas/generated/word.json ./words/*.toml