Skip to content

generate-sdk

generate-sdk #13

Workflow file for this run

name: Generate Ruby Backend SDK
on:
repository_dispatch:
types: [generate-sdk]
workflow_dispatch:
inputs:
actor:
type: string
description: "To username of the actor that triggered the workflow"
required: false
id:
type: string
description: "The ID of the pull request"
required: false
url:
type: string
description: "The URL of the pull request"
required: false
title:
type: string
description: "The title of the pull request"
required: false
description:
type: string
description: "The description of the pull request"
required: false
env:
DEFAULT_ACTOR: "tmilewski"
DEFAULT_TITLE: "Generate Ruby Backend SDK"
DEFAULT_DESCRIPTION: "Generated independently of an OpenAPI spec change"
DEFAULT_URL: "https://github.com/clerk/openapi-specs"
JAVA_DISTRIBUTION: "temurin"
JAVA_VERSION: "21"
MAVEN_VERSION: "3.9.9"
jobs:
generate-sdk:
runs-on: ubuntu-latest
name: Generate
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
cache: maven
distribution: ${{ env.JAVA_DISTRIBUTION }}
java-version: ${{ env.JAVA_VERSION }}
- name: Install Maven
uses: stCarolas/setup-maven@v5
with:
maven-version: ${{ env.MAVEN_VERSION }}
- name: Setup Maven Settings
uses: s4u/[email protected]
- name: Generate new client
run: ./bin/generate
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
# Skips local testing with `act`
if: ${{ github.actor != 'nektos/act' }}
with:
title: ${{ github.event.client_payload.title || inputs.title || env.DEFAULT_TITLE }}
body: "${{ github.event.client_payload.description || inputs.description || env.DEFAULT_DESCRIPTION }}\n\n${{ github.event.client_payload.url || inputs.url || env.DEFAULT_URL }}"
branch: "generate-sdk"
commit-message: "Generate Ruby Backend SDK"
branch-suffix: "timestamp"
assignees: ${{ github.event.client_payload.actor || inputs.actor || github.actor || env.DEFAULT_ACTOR }}
reviewers: ${{ env.DEFAULT_ACTOR }}