Skip to content

Commit

Permalink
Create spectral_oas_lint.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
eric-murray authored Aug 5, 2024
1 parent 650115f commit b038bf2
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/spectral_oas_lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
# CAMARA Project - workflow configuration to manually run CAMARA OAS rules
# see https://docs.github.com/en/actions/using-workflows/manually-running-a-workflow
# 31.01.2024 - initial version

name: Spectral manual run

on: workflow_dispatch

concurrency:
group: ${{ github.ref }}-${{ github.workflow }}
cancel-in-progress: true

jobs:
build:
name: Spectral linting
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission to commit and push, comment issues & post new PR
# Remove the ones you do not need
contents: write
issues: write
pull-requests: write
steps:
# Git Checkout
- name: Checkout Code
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
fetch-depth: 0 # If you use VALIDATE_ALL_CODEBASE = true, you can remove this line to improve performances
- name: Install Spectral
run: npm install -g @stoplight/spectral
- name: Install Spectral functions
run: npm install -g @stoplight/spectral-functions
- name: Run Spectral linting
run: spectral lint code/API_definitions/*.yaml --verbose --ruleset .spectral.yml

0 comments on commit b038bf2

Please sign in to comment.