From a7a68a00dd8cec2173d91298a5a3ee86239a2f27 Mon Sep 17 00:00:00 2001 From: Nicholas Wallace Date: Sat, 25 May 2024 20:18:05 +0000 Subject: [PATCH] Add: workflow for linting spec --- .github/workflows/lint-openapi.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/lint-openapi.yml diff --git a/.github/workflows/lint-openapi.yml b/.github/workflows/lint-openapi.yml new file mode 100644 index 000000000..3c6072d8d --- /dev/null +++ b/.github/workflows/lint-openapi.yml @@ -0,0 +1,30 @@ +name: API linting + +# Run on pull requests or pushes when there is a change to the OpenAPI file +on: + push: + paths: + - docs/ + pull_request: + paths: + - docs/ + +jobs: + build: + runs-on: ubuntu-latest + steps: + # Check out the repository + - name: Checkout + uses: actions/checkout@v4 + # Set up node to run the javascript + - name: Set up node + uses: actions/setup-node@v4 + # Install Redocly CLI + - name: Install Redocly CLI + run: npm install -g @redocly/cli@latest + # Perform linting for exploded spec + - name: Run linting for exploded spec + run: redocly lint docs/root.yaml --format=github-actions + # Perform linting for bundled spec + - name: Run linting for bundled spec + run: redocly lint docs/openapi.json --format=github-actions