Skip to content

Commit

Permalink
Spectral should run after source code checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
cmendible authored Sep 8, 2023
1 parent 0ff7ac4 commit e8faccc
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tools/github_workflows/run-publisher-with-env.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,18 +26,18 @@ jobs:
runs-on: ubuntu-latest
environment: ${{ inputs.API_MANAGEMENT_ENVIRONMENT }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 2

# Run Spectral
- uses: actions/setup-node@v3
with:
node-version: "14"
- run: npm install -g @stoplight/spectral
- run: spectral lint "${{ GITHUB.WORKSPACE }}/${{ inputs.API_MANAGEMENT_SERVICE_OUTPUT_FOLDER_PATH }}\apis\*.{json,yml,yaml}" --ruleset https://raw.githubusercontent.com/connectedcircuits/devops-api-linter/main/rules.yaml

# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
fetch-depth: 2

# Add this step for each APIM environment and pass specific set of secrets that you want replaced in the env section below
- name: "Perform namevalue secret substitution in configuration.${{ inputs.API_MANAGEMENT_ENVIRONMENT}}.yaml"
if: (inputs.API_MANAGEMENT_ENVIRONMENT == 'prod' )
Expand Down

0 comments on commit e8faccc

Please sign in to comment.