OAS Update #702
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Update SDK Repo Workflow | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| GO_VERSION: "1.25" | |
| JAVA_VERSION: "17" | |
| jobs: | |
| main-go: | |
| name: "[Go] Update SDK Repo" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} | |
| - name: Install Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Checkout generator repo | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "stackitcloud/stackit-sdk-generator" | |
| ref: "main" | |
| - name: Install Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| - name: Install project tools and dependencies | |
| shell: bash | |
| run: make project-tools | |
| - name: Download OAS | |
| run: make download-oas | |
| - name: Generate SDK | |
| run: make generate-go-sdk | |
| - name: Push SDK | |
| env: | |
| GH_REPO: "stackitcloud/stackit-sdk-go" | |
| GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} | |
| run: | | |
| 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 }})" | |
| main-python: | |
| name: "[Python] Update SDK Repo" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} | |
| - name: Install Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Checkout generator repo | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "stackitcloud/stackit-sdk-generator" | |
| ref: "main" | |
| - name: install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| version: "0.10.4" | |
| - name: Install project tools and dependencies | |
| shell: bash | |
| run: | | |
| python -m venv .venv | |
| . .venv/bin/activate | |
| python -m pip install --upgrade pip | |
| make project-tools LANGUAGE=python | |
| - name: Download OAS | |
| run: make download-oas | |
| - name: Generate SDK | |
| run: make generate-python-sdk | |
| - name: Install Python SDK | |
| working-directory: ./sdk-repo-updated | |
| run: make install-dev | |
| - name: Push Python SDK | |
| env: | |
| GH_REPO: "stackitcloud/stackit-sdk-python" | |
| GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} | |
| run: | | |
| 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" | |
| main-java: | |
| name: "[Java] Update SDK Repo" | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Install SSH Key | |
| uses: shimataro/ssh-key-action@v2 | |
| with: | |
| key: ${{ secrets.SSH_PRIVATE_KEY }} | |
| known_hosts: ${{ vars.SSH_KNOWN_HOSTS }} | |
| - name: Install Java | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: ${{ env.JAVA_VERSION }} | |
| - name: Checkout generator repo | |
| uses: actions/checkout@v6 | |
| with: | |
| repository: "stackitcloud/stackit-sdk-generator" | |
| ref: "main" | |
| - name: Download OAS | |
| run: make download-oas | |
| - name: Generate SDK | |
| run: make generate-java-sdk | |
| - name: Push Java SDK | |
| env: | |
| GH_REPO: "stackitcloud/stackit-sdk-java" | |
| GH_TOKEN: ${{ secrets.SDK_PR_TOKEN }} | |
| run: | | |
| 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" |