From bc0cd7fe6f59d1ca4883a21b50c313e55c8d774c Mon Sep 17 00:00:00 2001 From: "Ch.-David Blot" Date: Thu, 9 Oct 2025 11:45:12 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=AA=20ci:=20add=20spectral=20linter?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/check.yaml | 20 +++++++++++++++++++- .spectral.yml | 1 + 2 files changed, 20 insertions(+), 1 deletion(-) create mode 100644 .spectral.yml diff --git a/.github/workflows/check.yaml b/.github/workflows/check.yaml index ee1a8be..5133a97 100644 --- a/.github/workflows/check.yaml +++ b/.github/workflows/check.yaml @@ -1,5 +1,10 @@ name: osc-api-deploy check PR + +permissions: + contents: read + on: + workflow_dispatch: {} pull_request: paths: - outscale.yaml @@ -9,7 +14,7 @@ on: jobs: breaking-change-check: - runs-on: ubuntu-24.04 + runs-on: ubuntu-latest strategy: matrix: spec: @@ -33,3 +38,16 @@ jobs: base: ./base/${{ matrix.spec }} revision: ./revision/${{ matrix.spec }} fail-on: ERR + + lint: + name: Run Spectral + runs-on: ubuntu-latest + continue-on-error: true + steps: + # Check out the repository + - uses: actions/checkout@v4 + + # Run Spectral + - uses: stoplightio/spectral-action@latest + with: + file_glob: 'outscale-*.yaml' diff --git a/.spectral.yml b/.spectral.yml new file mode 100644 index 0000000..d47c47d --- /dev/null +++ b/.spectral.yml @@ -0,0 +1 @@ +extends: ["spectral:oas"]