ci: Enable OpenAPI validate action

Pull the container `openapitools/openapi-generator-cli` and run the
validation.

Signed-off-by: Michael Zhao <michael.zhao@arm.com>
This commit is contained in:
Michael Zhao 2023-11-19 11:50:46 +00:00 committed by Rob Bradford
parent 4b87964093
commit 70380d289f

16
.github/workflows/openapi.yaml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Cloud Hypervisor OpenAPI Validation
on:
pull_request:
jobs:
Validate:
runs-on: ubuntu-latest
container: openapitools/openapi-generator-cli
steps:
- uses: actions/checkout@v2
- name: Validate OpenAPI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
/usr/local/bin/docker-entrypoint.sh validate -i vmm/src/api/openapi/cloud-hypervisor.yaml