Skip to content

Commit

Permalink
YAML validator
Browse files Browse the repository at this point in the history
  • Loading branch information
willemarcel committed May 3, 2024
1 parent 0c49736 commit 8cce2d6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/validate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Validate YAML
on: [push]
jobs:
validate:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: navikt/yaml-validator@v4
with:
schema_path: schema.yaml
document_path: campaigns/
validate_file_extension: 'no' # optional, defaults shown, enum of ['yes', 'no']
filter_extensions: '.yaml'
32 changes: 32 additions & 0 deletions schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
---
deployments:
required: true
type: list
schema:
type: dict
schema:
name:
required: true
type: string
platforms:
required: true
type: list
schema:
name:
required: true
type: string
tsv_format:
require: false
type: boolean
rename_as_ict:
require: false
type: boolean
process_as_ict:
require: false
type: boolean
coords_divisor:
require: false
type: integer
files:
required: true
type: list

0 comments on commit 8cce2d6

Please sign in to comment.