forked from openai/openai-openapi
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (27 loc) · 924 Bytes
/
Copy pathupdate-spec.yml
File metadata and controls
33 lines (27 loc) · 924 Bytes
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
name: Update OpenAPI Spec
on:
schedule:
- cron: '0 5 * * *' # Run every day at 05:00 UTC
workflow_dispatch: # Allow manual trigger
jobs:
update-spec:
runs-on: ubuntu-latest
steps:
- name: Checkout master branch
uses: actions/checkout@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Download OpenAPI spec
run: |
curl -L -o openapi.yaml https://app.stainless.com/api/spec/documented/openai/openapi.documented.yml
- name: Check for changes and commit
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add openapi.yaml
if git diff --cached --quiet; then
echo "No changes detected"
else
git commit -m "Update OpenAPI spec - $(date -u +"%Y-%m-%d")"
git push
fi