-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (47 loc) · 1.55 KB
/
generate_sdk.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
name: Generate API clients
on:
repository_dispatch:
types: [on-oas-updated]
jobs:
generate_go:
name: Generate Go client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Download OpenAPI schema document
run: |
mkdir tmp
curl https://raw.githubusercontent.com/Apicurio/apicurio-registry/master/${{ github.event.client_payload.openapi_file_path }} > tmp/input-schema.json
- name: Modify input schema
run: ./hack/scripts/preprocess-schema.sh
- name: Delete old generated code
run: |
rm -rf *.go docs
- uses: craicoverflow/openapi-generator-action@v1
with:
generator: go
input: tmp/input-schema.json
git-repo-id: apicurio-registry-client-sdk-go
git-user-id: Apicurio
package-name: registryclient
template: .github/templates
- name: Clean up temporary files
run: rm -r tmp
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
generated:
- '**'
- name: Create Pull Request
if: steps.changes.outputs.generated == 'true'
uses: peter-evans/create-pull-request@v3
with:
delete-branch: true
branch-suffix: short-commit-hash
branch: generate-sdk
title: "[generated] Update API client"
team-reviewers: '@Apicurio/developers'
commit-message: "chore: update API client"
body: |
Automated update of the Apicurio Registry SDK