1
0
mirror of synced 2025-12-30 03:01:36 -05:00
Files
docs/.github/workflows/openapi-schema-check.yml
dependabot[bot] 893f50cd7a Bump actions/setup-node from 2.5.0 to 2.5.1 (#24009)
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2.5.0 to 2.5.1.
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](04c56d2f95...1f8c6b94b2)

---
updated-dependencies:
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Peter Bengtsson <peterbe@github.com>
2022-01-10 09:07:53 -05:00

57 lines
2.1 KiB
YAML

name: OpenAPI dev mode check
# **What it does**: Checks that the files in lib/rest/static/decorated match
# the files in lib/rest/static/dereferenced. Checks that the decorated
# schemas in lib/rest/static/decorated are not in development mode.
# Development mode schemas have a branch name and development mode tag in the
# info.version property.
# **Why we have it**: To ensure that we aren't every shipping decorated schemas
# that are out of sync with the source derefereced schema. To ensure that
# decorated schemas generated locally are not published. Locally generated
# decorated schemas are pushing up to the remote for staging purposes only.
# **Who does it impact**: Docs content writers updating REST API docs and
# the docs engineering team as maintainers of the scripts and workflows.
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths:
- 'lib/rest/static/**'
- 'script/rest/**/*.js'
- 'package*.json'
permissions:
contents: read
# This allows a subsequently queued workflow run to interrupt previous runs
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true
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@ec3a7ce113134d7a93b817d10a8272cb61118579
- name: Setup node
uses: actions/setup-node@1f8c6b94b26d0feae1e387ca63ccbdc44d27b561
with:
node-version: 16.13.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