-
Notifications
You must be signed in to change notification settings - Fork 188
73 lines (60 loc) · 2.59 KB
/
sync-rest-api-docs.yaml
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
70
71
72
73
name: Sync Camunda REST API
on:
schedule:
- cron: "0 15 * * 4" # Runs every Thursday at 3 PM UTC
workflow_dispatch:
jobs:
sync-file:
runs-on: ubuntu-latest
steps:
- name: Checkout Camunda docs repository
uses: actions/checkout@v3
with:
repository: camunda/camunda-docs
path: docs
- name: Checkout Camunda repository
uses: actions/checkout@v3
with:
repository: camunda/camunda
path: rest-spec
sparse-checkout: zeebe/gateway-protocol/src/main/proto/rest-api.yaml
sparse-checkout-cone-mode: false
- name: Sync documentation
run: |
cd docs
mv ../rest-spec/zeebe/gateway-protocol/src/main/proto/rest-api.yaml api/camunda/camunda-openapi.yaml
npm i
npm run api:generate:camunda
if git diff-index --quiet HEAD; then
echo "No changes to commit."
exit 0
fi
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v2
with:
app_id: ${{ secrets.GH_APP_API_SYNC_ID }}
private_key: ${{ secrets.GH_APP_API_SYNC_KEY }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
with:
token: "${{ steps.generate_token.outputs.token }}"
path: docs
title: Update camunda REST API doc
body: |
## Description
This is an autogenerated PR by the [sync api specs workflow](https://github.com/camunda/camunda-docs/tree/main/.github/workflows/sync-rest-api-docs.yaml).
This PR contains every changes made to the REST api specs in the [monorepo](https://github.com/camunda/camunda/blob/main/zeebe/gateway-protocol/src/main/proto/rest-api.yaml) in the last week.
This PR contains also all the generated OpenAPI files related to the changes.
## When should this change go live?
- There is **no urgency** with this change and can be released at any time.
## PR Checklist
- My changes are for the **next minor** and are in `/docs` directory (aka `/next/`).
- My changes require a [technical writer review](https://github.com/camunda/camunda-docs/blob/main/howtos/documentation-guidelines.md#review-process), and I've assigned @camunda/tech-writers as a reviewer.
commit-message: "docs: update REST API spec"
branch: update-rest-doc
delete-branch: true
team-reviewers: camunda/tech-writers
reviewers: pepopowitz
base: main
labels: deploy