mirror of
https://github.com/okieselbach/AutopilotMonitor.git
synced 2026-10-24 20:53:06 +00:00
4a1194569e
Bumps [actions/checkout](https://github.com/actions/checkout) from 5 to 7. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v5...v7) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '7' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
64 lines
1.8 KiB
YAML
64 lines
1.8 KiB
YAML
name: Validate & Combine Rules
|
|
on:
|
|
push:
|
|
branches: [main, dev]
|
|
paths:
|
|
- 'rules/gather/**'
|
|
- 'rules/analyze/**'
|
|
- 'rules/ime-log-patterns/**'
|
|
- 'rules/schema/**'
|
|
- 'rules/scripts/**'
|
|
pull_request:
|
|
paths:
|
|
- 'rules/gather/**'
|
|
- 'rules/analyze/**'
|
|
- 'rules/ime-log-patterns/**'
|
|
- 'rules/schema/**'
|
|
- 'rules/scripts/**'
|
|
|
|
jobs:
|
|
validate-and-combine:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v7
|
|
|
|
- uses: actions/setup-node@v7
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: Install ajv-cli
|
|
run: npm install -g ajv-cli ajv-formats
|
|
|
|
- name: Validate Gather Rules
|
|
run: |
|
|
for f in rules/gather/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/gather-rule.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Validate Analyze Rules
|
|
run: |
|
|
for f in rules/analyze/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/analyze-rule.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Validate IME Log Patterns
|
|
run: |
|
|
for f in rules/ime-log-patterns/*.json; do
|
|
echo "Validating $f..."
|
|
ajv validate -s rules/schema/ime-log-pattern.schema.json -d "$f" --spec=draft2020 -c ajv-formats
|
|
done
|
|
|
|
- name: Combine rules into dist/
|
|
run: node rules/scripts/combine.js
|
|
|
|
- name: Commit dist/ changes
|
|
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
uses: stefanzweifel/git-auto-commit-action@v7
|
|
with:
|
|
commit_message: "chore: regenerate rules/dist from individual files"
|
|
file_pattern: "rules/dist/*"
|