-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set up action to validate TOML files
- Loading branch information
1 parent
3d0561f
commit cbebfc5
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Validate data files | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'data/**/*.toml' | ||
|
||
pull_request: | ||
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 check data/series.toml && taplo format --check data/series.toml | ||
|
||
- name: Validate party TOML files | ||
run: | | ||
shopt -s globstar | ||
taplo check data/parties/**/*.toml && taplo format --check data/parties/**/*.toml |