-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (46 loc) · 1.62 KB
/
configuration_validator.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
42
43
44
45
46
47
48
name: Validate JSONs
on: [push]
jobs:
copy-configuration-files:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
# Different Node versions possible. Each node version will trigger the action
node-version:
- 18.x
steps:
- name: Checkout source branch
uses: actions/checkout@v4
with:
# Hardcoded reference to the thema repo, since this repo contains the boilerplate for all repos
repository: Informatievlaanderen/OSLOthema-template
ref: config
# The source folder contains the configuration files, as defined in the thema-template-repository
path: source
- name: Checkout target branch
uses: actions/checkout@v4
with:
# Dynamic reference to the active repository so that it works immediately when creating a new thema repo
repository: ${{ github.repository }}
ref: standaardenregister
# Target is the folder containing the content of thema-repository
path: target
# Extra step to debug the file structure
- name: List file structure of source dir
shell: bash
run: |
ls source
- name: List file structure of target dir
shell: bash
run: |
ls target
- name: Validate JSON
# https://github.com/marketplace/actions/json-yaml-validate
uses: GrantBirki/[email protected]
with:
json_schema: source/schemas/configuration.json
json_extension: json
base_dir: target
comment: true
use_gitignore: false