Skip to content

ci: add a script and CI job to validate spec examples #3

ci: add a script and CI job to validate spec examples

ci: add a script and CI job to validate spec examples #3

name: Validate AsyncAPI Examples
on:
push:
branches:
- script-ci-spec-validation # added temporarily for testing purpose
# - master
pull_request_target:
types: [opened, reopened, synchronize, edited, ready_for_review]
jobs:
validate-examples:
- name: Validate Spec Examples

Check failure on line 14 in .github/workflows/validate-examples.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/validate-examples.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Find YAML files
run: |
files=$(find examples/ \( -path 'examples/social-media/*' -prune \) -o -type f \( -name "*.yml" -o -name "*.yaml" \))
echo "::set-output name=files::$files"
- name: Validate AsyncAPI documents
uses: asyncapi/[email protected]
with:
command: custom
arguments: |
validate ${{ steps.FindYAMLFiles.outputs.files }}