-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (45 loc) · 1.46 KB
/
generate.yml
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
name: Generate Ruby Backend SDK
on:
workflow_dispatch:
jobs:
generate-sdk:
runs-on: ubuntu-latest
name: Generate
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Move root to ./out
run: |
rm -rf ./out
mkdir ./out
shopt -s extglob
shopt -s dotglob
mv !(out) ./out
- name: Generate new client
uses: openapi-generators/openapitools-generator-action@v1
with:
generator: ruby
command-args: -o out --api-name-suffix=' '
config-file: out/sdk-generator-config.json
openapi-file: out/resources/oas/bapi-2024-10-01.yml
# openapi-url: https://raw.githubusercontent.com/clerk/openapi-specs/refs/heads/main/bapi/2024-10-01.yml
template-dir: out/resources/templates
- name: Move generated files to root
run: |
shopt -s extglob
shopt -s dotglob
mv -fv ./out/* .
rm -rv ./out
ls -la .
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
# Skips local testing with `act`
if: ${{ github.actor != 'nektos/act' }}
with:
title: "Generate Ruby Backend SDK"
body: "[Auto-generated]"
branch: "generate-ruby-backend-sdk"
commit-message: "Generate Ruby Backend SDK"
branch-suffix: "timestamp"
assignees: "tmilewski"
reviewers: "tmilewski"