Skip to content

Validate TOML Files #30

Validate TOML Files

Validate TOML Files #30

Workflow file for this run

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: ${{ inputs.commit_sha || github.event.head_commit.id || vars.GITHUB_SHA }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- 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