Skip to content

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

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

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

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]
workflow_dispatch:
inputs:
name:
description: 'Enter something'
required: true
jobs:
validate-examples:

Check failure on line 19 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 19
name: Validate Spec Examples - ${{ matrix.os }}
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 }}