Repository navigation
50 lines (39 loc) · 1.58 KB
/
Copy pathapi-v3-spec.yml
File metadata and controls
50 lines (39 loc) · 1.58 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
49
50
name: API v3 Spec
on:
pull_request:
paths:
- "docs/api-v3-reference/**"
- ".github/workflows/api-v3-spec.yml"
concurrency:
group: api-v3-spec-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
validate:
name: Lint source & verify bundle freshness
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@e14015d583714f6e62063499dc959a02595150a1 # v2.21.1
with:
egress-policy: audit
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false
- name: Install pnpm
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0
- name: Setup Node.js (version from .nvmrc)
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: ".nvmrc"
cache: pnpm
# Root importer only: installs the lockfile-pinned @redocly/cli (and other root devDeps)
# without building the whole workspace. bundle.mjs falls back to pinned npx when absent.
- name: Install spec tooling (root dev dependencies)
run: pnpm install --frozen-lockfile --ignore-scripts --filter formbricks
- name: Lint OpenAPI v3 source tree
run: node docs/api-v3-reference/scripts/bundle.mjs --lint
- name: Verify committed bundle is in sync with src/
run: node docs/api-v3-reference/scripts/bundle.mjs --check