-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(workflow): add a GitHub Action to validate JSON schema changes (#258)
This will address the deficiency surfaced in #163 --------- Signed-off-by: Andrew Pollock <[email protected]>
- Loading branch information
1 parent
4f79ec8
commit 1c585fd
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Validate OSV JSON Schema | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: | ||
- opened | ||
- edited | ||
- reopened | ||
|
||
permissions: | ||
pull-requests: read | ||
|
||
jobs: | ||
validate-osv-schema: | ||
name: Validate OSV Schema | ||
permissions: | ||
contents: read | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Check for changes to OSV Schema | ||
id: check-for-changed-osv-schema | ||
uses: tj-actions/changed-files@v41 | ||
with: | ||
files: | | ||
validation/schema.json | ||
- name: Validate OSV Schema | ||
if: steps.check-for-changed-osv-schema.outputs.any_changed == 'true' | ||
uses: dsanders11/[email protected] | ||
with: | ||
# https://github.com/marketplace/actions/json-schema-validate#validating-schema | ||
schema: json-schema | ||
files: validation/schema.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
go.work | ||
go.work.sum |