Linting OpenAPI spec with Vacuum #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Vacuum OpenAPI Linting | |
run-name: Linting OpenAPI spec with Vacuum | |
on: push | |
jobs: | |
vacuum-lint: | |
name: Vacuum OpenAPI Linting | |
if: github.repository != 'mycloudnexus/cc-api-sandbox' | |
runs-on: ubuntu-24.04 | |
container: dshanley/vacuum:v0.13.1 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Generate Vacuum HTML Reports | |
run: mkdir -p reports; for FILEPATH in specs/ccapi*.json; do FILE="$(echo $FILEPATH | cut -d '/' -f2 | cut -d '.' -f1)"; vacuum html-report "${FILEPATH}" "reports/report-${FILE}.html"; done | |
shell: bash | |
- name: Archive Vacuum HTML Reports | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Vacuum HTML Reports | |
path: reports/*.html | |
- name: Lint with Vacuum | |
# Ignoring failures because there are errors that likely can't be fixed any time soon. | |
run: vacuum lint specs/ccapi* || true | |
shell: bash |