forked from coala/projects
-
Notifications
You must be signed in to change notification settings - Fork 16
34 lines (31 loc) · 943 Bytes
/
validate-projects.yml
File metadata and controls
34 lines (31 loc) · 943 Bytes
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
---
name: Validate yaml files
on:
- push
- pull_request
permissions:
contents: read
pull-requests: write # enable write permissions for pull request comments
jobs:
validate-yaml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get go-yq
run: |
wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O yq
chmod +x yq
- name: extract front matter
run: |
find ./_projects -name "*.md" -exec bash -c "./yq --front-matter=extract {} > {}.yaml " \;
- name: json-yaml-validate
id: json-yaml-validate
uses: GrantBirki/json-yaml-validate@v4.0.0
with:
comment: true
use_gitignore: false
json_schema: ./validation/schema.json
json_exclude_regex: ""
exclude_file: ./validation/exclude
base_dir: "./_projects"
yaml_as_json: true