diff --git a/.github/workflows/validate_tools_yaml.yml b/.github/workflows/validate_tools_yaml.yml new file mode 100644 index 0000000..1cc88fe --- /dev/null +++ b/.github/workflows/validate_tools_yaml.yml @@ -0,0 +1,22 @@ +name: validate tools yaml + +on: + pull_request: + paths: [ "tools.yml", "tools.schema.yaml", ".github/workflows/validate_tools_yaml.yml" ] + push: + paths: [ "tools.yml", "tools.schema.yaml", ".github/workflows/validate_tools_yaml.yml" ] + workflow_dispatch: + +permissions: read-all + +jobs: + lint-yaml: + runs-on: ubuntu-latest + steps: + - name: install yamale + run: pip install 'yamale>=5.2.1,<6' + - name: checkout + uses: actions/checkout@v4 + - name: lint tools yaml + run: yamale -s tools.schema.yaml tools.yml + diff --git a/tools.schema.yaml b/tools.schema.yaml new file mode 100644 index 0000000..c0ee7b4 --- /dev/null +++ b/tools.schema.yaml @@ -0,0 +1,29 @@ +# yamale schema syntax: https://github.com/23andMe/Yamale#schema +list(include('tool')) + +--- + +tool: + name: str() + publisher: str() + description: str() # all after 250 chars is truncated + repoUrl: str(required=False) + websiteUrl: str(matches='^https?://.+') + categories: list(include('category')) + +# see tool-categories.yml +category: > + enum( + 'opensource', + 'proprietary', + 'build-integration', + 'analysis', + 'author', + 'github-action', + 'github-app', + 'transform', + 'library', + 'signing-notary', + 'distribute' + ) +