-
-
Notifications
You must be signed in to change notification settings - Fork 5
69 lines (57 loc) · 2.03 KB
/
Copy pathrefresh-specs.yml
File metadata and controls
69 lines (57 loc) · 2.03 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Refresh OpenAPI Specs
on:
workflow_dispatch:
schedule:
- cron: '0 3 * * 1'
jobs:
refresh-specs:
runs-on: arc-tsarr
permissions:
contents: write
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v7
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: 1.3.14
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Refresh checked-in specs
env:
BAZARR_OPENAPI_URL: ${{ secrets.BAZARR_OPENAPI_URL }}
BAZARR_OPENAPI_API_KEY: ${{ secrets.BAZARR_OPENAPI_API_KEY }}
run: bun run refresh:specs
- name: Regenerate clients and types
run: bun run generate && bun run generate:types
- name: Run TypeScript check
run: bun run typecheck
- name: Check for changes
id: changed
run: |
if [ -n "$(git status --porcelain)" ]; then
echo "changed=true" >> "$GITHUB_OUTPUT"
else
echo "changed=false" >> "$GITHUB_OUTPUT"
fi
- name: Create refresh pull request
if: steps.changed.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v8
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'chore: refresh checked-in OpenAPI specs'
title: 'Refresh checked-in OpenAPI specs'
body: |
This PR refreshes the checked-in OpenAPI snapshots under `specs/` and regenerates the SDK output from them.
What changed:
- updated one or more `specs/*-openapi.json` files
- regenerated `src/generated/*`
- regenerated exported type wrappers
Notes:
- builds and releases continue to use the checked-in specs for reproducibility
- Bazarr refreshes only when a `BAZARR_OPENAPI_URL` secret is configured
branch: chore/refresh-openapi-specs
delete-branch: true