-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (35 loc) · 1.12 KB
/
generate-sdks.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
name: Generate SDKs
on:
workflow_dispatch:
push:
branches:
- 'release-**'
jobs:
preprocess-specifications:
name: Setup Environment
runs-on: ubuntu-latest
env:
ORIG_SPEC_DIR: ${{ github.workspace }}/res
SPEC_DIR: ${{ github.workspace }}/specs_preprocessed
PREPROCESSING_DIR: ${{ github.workspace }}/sdk-blueprints/preprocessing
steps:
- name: Checkout workflow repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
- name: Preprocess OpenAPI specifications
id: preprocess
run: |
python3 -m pip install -r $PREPROCESSING_DIR/requirements.txt
python3 $PREPROCESSING_DIR/preprocessing.py $ORIG_SPEC_DIR $SPEC_DIR
- name: Upload preprocessed specifications as artifact
uses: actions/upload-artifact@v4
with:
name: processed-specs-${{ github.ref_name }}
path: ${{ env.SPEC_DIR }}
retention-days: 7
generate-python-sdk:
name: Generate Python SDK
needs: setup-environment
uses: ./.github/workflows/generate-python-sdk.yml
secrets: inherit