Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: add json-schema-check workflow #98

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/json-schema-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: json-schema-check

on:
pull_request:
workflow_dispatch:

jobs:
check-if-relevant-files-changed:
runs-on: ubuntu-22.04
outputs:
run-check: ${{ steps.paths_filter.outputs.json_or_yaml }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: paths_filter
with:
filters: |
json_or_yaml:
- '**/schema/*.schema.json'
- '**/config/*.param.yaml'

json-schema-check:
needs: check-if-relevant-files-changed
if: needs.check-if-relevant-files-changed.outputs.run-check == 'true'
runs-on: ubuntu-22.04
steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Run json-schema-check
uses: autowarefoundation/autoware-github-actions/json-schema-check@v1

no-relevant-changes:
needs: check-if-relevant-files-changed
if: needs.check-if-relevant-files-changed.outputs.run-check == 'false'
runs-on: ubuntu-22.04
steps:
- name: Dummy step
run: echo "No relevant changes, passing check"
Loading