-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (46 loc) · 1.41 KB
/
openapi-sync.yml
File metadata and controls
51 lines (46 loc) · 1.41 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
name: openapi-sync
on:
schedule:
- cron: '0 5 * * 1' # Mondays at 05:00 UTC
workflow_dispatch: {}
permissions:
contents: write
pull-requests: write
jobs:
sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: pull spec
run: make openapi-pull
- name: regenerate client
run: make generate
- name: detect drift
id: drift
run: |
if git diff --quiet; then
echo "changed=false" >> $GITHUB_OUTPUT
else
echo "changed=true" >> $GITHUB_OUTPUT
fi
- name: open PR
if: steps.drift.outputs.changed == 'true'
uses: peter-evans/create-pull-request@v6
with:
commit-message: 'chore(api): sync OpenAPI spec from apidocs.zenduty.com'
title: 'chore(api): sync OpenAPI spec'
body: |
Automated sync of the upstream Zenduty / Xurrent IMR OpenAPI spec.
- Refreshed `api/openapi.yaml` via `make openapi-pull`
- Regenerated `internal/zenduty/zenduty.gen.go` via `make generate`
Please review the diff to confirm no breaking changes leaked into
the typed CLI commands.
branch: bot/openapi-sync
delete-branch: true
labels: |
automation
api