Skip to content

Commit 56e1d92

Browse files
authored
feat(java): Add Java SDK generation step to pipeline (#38)
1 parent dfb6d3b commit 56e1d92

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

.github/workflows/sdk-pr.yaml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,37 @@ jobs:
8686
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
8787
run: |
8888
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 }})" "git@github.com:stackitcloud/stackit-sdk-python.git" "python"
89+
90+
main-java:
91+
name: "[Java] Update SDK Repo"
92+
runs-on: ubuntu-latest
93+
steps:
94+
- name: Install SSH Key
95+
uses: shimataro/ssh-key-action@v2
96+
with:
97+
key: ${{ secrets.SSH_PRIVATE_KEY }}
98+
known_hosts: ${{ vars.SSH_KNOWN_HOSTS }}
99+
- name: Install Java
100+
uses: actions/setup-java@v4
101+
with:
102+
distribution: "temurin"
103+
java-version: ${{ env.JAVA_VERSION }}
104+
- name: Checkout generator repo
105+
uses: actions/checkout@v5
106+
with:
107+
repository: "stackitcloud/stackit-sdk-generator"
108+
ref: "main"
109+
- name: Build
110+
uses: ./.github/actions/build/java
111+
with:
112+
go-version: ${{ env.GO_VERSION }}
113+
- name: Download OAS
114+
run: make download-oas
115+
- name: Generate SDK
116+
run: make generate-sdk LANGUAGE=java
117+
- name: Push Java SDK
118+
env:
119+
GH_REPO: "stackitcloud/stackit-sdk-java"
120+
GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }}
121+
run: |
122+
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 }})" "git@github.com:stackitcloud/stackit-sdk-java.git" "java"

0 commit comments

Comments
 (0)