2021-03-09 15:06:22 +01:00
---
2022-09-11 13:25:58 -04:00
name : PUSH & PULL REQUEST - YAML Lint and Schema Validation Checks
on : [ push,pull_request]
2021-10-25 21:35:02 +01:00
2021-03-09 14:16:42 +01:00
jobs :
2021-03-09 14:28:09 +01:00
lintFiles :
2023-10-03 17:21:42 +01:00
if : github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name
2021-03-09 15:06:22 +01:00
runs-on : ubuntu-latest
steps :
2022-09-10 16:42:26 -04:00
- uses : actions/checkout@v3
2023-10-03 17:10:21 +01:00
- name : Check file extensions
2023-10-03 17:16:05 +01:00
run : if [[ $(find "${GITHUB.WORKSPACE}/yml" -type f -not -name "*.yml") ]]; then echo "Files with unexpected extension found, please ensure you use '.yml' (all lower case) for files in the yml/ folder."; exit 1; fi
2022-09-10 17:33:11 -04:00
- name : yaml-lint
uses : ibiqlik/action-yamllint@v3
2022-09-10 07:22:41 -04:00
with :
2022-09-11 01:23:21 -04:00
no_warnings : true
2022-09-11 00:38:05 -04:00
file_or_dir : yml/**/*.yml
2022-09-10 17:33:11 -04:00
config_file : .github/.yamllint
2022-10-04 06:50:59 -04:00
- name : Validate Template Schema
uses : cketti/action-pykwalify@v0.3-temp-fix
with :
files : YML-Template.yml
schema : YML-Schema.yml
2022-09-11 00:30:03 -04:00
- name : Validate OSBinaries YAML Schema
uses : cketti/action-pykwalify@v0.3-temp-fix
with :
files : yml/OSBinaries/*.yml
schema : YML-Schema.yml
- name : Validate OSLibraries YAML Schema
uses : cketti/action-pykwalify@v0.3-temp-fix
with :
files : yml/OSLibraries/*.yml
schema : YML-Schema.yml
- name : Validate OSScripts YAML Schema
uses : cketti/action-pykwalify@v0.3-temp-fix
with :
files : yml/OSScripts/*.yml
schema : YML-Schema.yml
- name : Validate OtherMSBinaries YAML Schema
uses : cketti/action-pykwalify@v0.3-temp-fix
with :
files : yml/OtherMSBinaries/*.yml
schema : YML-Schema.yml