Generate #127
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: Generate | |
permissions: | |
checks: write | |
contents: write | |
pull-requests: write | |
statuses: write | |
id-token: write | |
"on": | |
workflow_dispatch: | |
inputs: | |
force: | |
description: Force generation of SDKs | |
type: boolean | |
default: false | |
set_version: | |
description: optionally set a specific SDK version | |
type: string | |
schedule: | |
- cron: 0 0 * * * | |
jobs: | |
generate: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone SDK repo | |
uses: actions/checkout@v3 | |
- name: Set up SSH | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
mkdir -p ~/.ssh | |
ssh-keyscan github.com >> ~/.ssh/known_hosts | |
echo "${{ secrets.FH_OPS_SSH_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 400 ~/.ssh/id_ed25519 | |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null | |
ssh-add ~/.ssh/id_ed25519 | |
- name: Clone developers repo | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
run: | | |
git clone git@github.com:firehydrant/developers.git /tmp/dev-repo | |
cd /tmp/dev-repo | |
git checkout main | |
- name: Copy OpenAPI spec | |
run: | | |
mkdir -p .speakeasy | |
cp /tmp/dev-repo/docs/public/openapi3_doc.json ${GITHUB_WORKSPACE}/openapi.json | |
- name: Generate SDK | |
uses: speakeasy-api/sdk-generation-action@v15 | |
with: | |
force: ${{ github.event.inputs.force }} | |
mode: pr | |
set_version: ${{ github.event.inputs.set_version }} | |
github_access_token: ${{ secrets.GITHUB_TOKEN }} | |
npm_token: ${{ secrets.NPM_TOKEN }} | |
SPEAKEASY_API_KEY: ${{ secrets.SPEAKEASY_API_KEY }} |