-
Notifications
You must be signed in to change notification settings - Fork 66.3k
48 lines (40 loc) · 1.56 KB
/
validate-openapi-check.yml
File metadata and controls
48 lines (40 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: Validate OpenAPI Check Docker
# **What it does**: Tests building and running the OpenAPI check Docker container
# **Why we have it**: To ensure the Dockerfile and openapi-check script work correctly
# **Who does it impact**: Docs engineering.
on:
workflow_dispatch:
pull_request:
paths:
- 'Dockerfile.openapi_decorator'
- 'src/rest/scripts/openapi-check.ts'
- 'src/rest/scripts/utils/get-operations.ts'
- 'src/rest/scripts/utils/operation.ts'
# In case dependencies change
- 'package.json'
- 'package-lock.json'
- 'tsconfig.json'
# Self-test
- '.github/workflows/validate-openapi-check.yml'
permissions:
contents: read
jobs:
validate-openapi-check:
runs-on: ubuntu-latest
if: github.repository == 'github/docs-internal'
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: Build Docker image
run: |
docker build -f Dockerfile.openapi_decorator -t openapi-decorator:test .
- name: Test Docker image with sample OpenAPI file
run: |
docker run --rm openapi-decorator:test -f "src/rest/data/fpt-2022-11-28/schema.json"
- name: Test Docker image with multiple OpenAPI files
run: |
docker run --rm openapi-decorator:test \
-f "src/rest/data/fpt-2022-11-28/schema.json" \
"src/rest/data/ghec-2022-11-28/schema.json"