Skip to content

Commit

Permalink
feat(ci): auto-generate latest SDK
Browse files Browse the repository at this point in the history
Auto-generate latest SDK on updates to openapi.json file.
  • Loading branch information
matoous committed Dec 20, 2024
1 parent b38322d commit 0517047
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/generate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Generate

on:
workflow_dispatch: {}
pull_request:
paths:
- openapi.json
branches:
- main

env:
GOPRIVATE: "github.com/sumup/*"

jobs:
generate:
name: Generate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2

- uses: actions/setup-go@3041bf56c941b39c61721a86cd11f3bb1338122a # v5.2.0
with:
go-version: '1.22'

- run: git config --global url."https://x-access-token:${{ secrets.GH_ACTIONS_PAT_2 }}@github.com/".insteadOf "https://github.com/"

- run: go install github.com/sumup/gogenitor@latest

# Would be nice to run this from gogenitor but goimports can't be imported as a pkg
- run: go install golang.org/x/tools/cmd/goimports@latest

- run: gogenitor --out . --specs ./openapi.json

0 comments on commit 0517047

Please sign in to comment.