1
0
mirror of synced 2025-12-26 14:02:45 -05:00
Files
docs/.github/workflows/openapi-schema-check.yml
2021-08-05 17:28:09 +00:00

39 lines
1.1 KiB
YAML

name: OpenAPI dev mode check
# **What it does**:
# **Why we have it**:
# **Who does it impact**:
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- 'lib/rest/static/**'
jobs:
check-schema-versions:
if: ${{ github.repository == 'github/docs-internal' }}
runs-on: ${{ fromJSON('["ubuntu-latest", "self-hosted"]')[github.repository == 'github/docs-internal'] }}
steps:
- name: Checkout repository code
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: Setup node
uses: actions/setup-node@38d90ce44d5275ad62cc48384b3d8a58c500bb5f
with:
node-version: 16.x
cache: npm
- name: Install dependencies
run: npm ci
# Differences between decorated and dereferenced files indicates a problem
- name: Generate decorated files to check that there are no differences
run: script/rest/update-files.js --decorate-only
- name: Check if deref/decorated schemas are dev mode and that they match
run: .github/actions-scripts/openapi-schema-branch.js