Skip to content

Commit e8ba765

Browse files
authored
feat: add python sdk (#29)
1 parent 900be85 commit e8ba765

File tree

1 file changed

+53
-3
lines changed

1 file changed

+53
-3
lines changed

.github/workflows/sdk-pr.yaml

Lines changed: 53 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ env:
1111
JAVA_VERSION: "11"
1212

1313
jobs:
14-
main:
15-
name: Update SDK Repo
14+
main-go:
15+
name: [Go] Update SDK Repo
1616
runs-on: ubuntu-latest
1717
steps:
1818
- name: Install SSH Key
@@ -49,4 +49,54 @@ jobs:
4949
GH_REPO: "stackitcloud/stackit-sdk-go"
5050
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
5151
run: |
52-
scripts/sdk-create-pr.sh "oas-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
52+
scripts/sdk-create-pr.sh "oas-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})"
53+
main-python:
54+
name: [Python] Update SDK Repo
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Install SSH Key
58+
uses: shimataro/ssh-key-action@v2
59+
with:
60+
key: ${{ secrets.SSH_PRIVATE_KEY }}
61+
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
62+
- name: Install Java
63+
uses: actions/setup-java@v4
64+
with:
65+
distribution: "temurin"
66+
java-version: ${{ env.JAVA_VERSION }}
67+
- name: Checkout generator repo
68+
uses: actions/checkout@v3
69+
with:
70+
repository: "stackitcloud/stackit-sdk-generator"
71+
ref: "main"
72+
- name: Build
73+
uses: ./.github/actions/build
74+
with:
75+
go-version: ${{ env.GO_VERSION }}
76+
- name: Download OAS
77+
run: make download-oas
78+
- name: Generate SDK
79+
run: make generate-sdk LANGUAGE=python
80+
- uses: actions/checkout@v3
81+
with:
82+
repository: "stackitcloud/stackit-sdk-python-core"
83+
ref: "main"
84+
path: 'python-core'
85+
- name: Install Python SDK Core
86+
working-directory: 'python-core'
87+
run: make install
88+
- name: Install Python SDK
89+
working-directory: ./sdk-repo-updated
90+
run: make install-dev
91+
- name: Lint Python
92+
working-directory: ./sdk-repo-updated
93+
run: make lint
94+
- name: Test Python
95+
working-directory: ./sdk-repo-updated
96+
run: make test
97+
- name: Push Python SDK
98+
env:
99+
GH_REPO: "stackitcloud/stackit-sdk-python"
100+
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
101+
run: |
102+
scripts/sdk-create-pr.sh "generator-bot-${{ github.run_id }}" "Generated from GitHub run [${{ github.run_id }}](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})" "[email protected]:stackitcloud/stackit-sdk-python.git" "python"

0 commit comments

Comments
 (0)