-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (31 loc) · 1.1 KB
/
generate.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/setup-go@f111f3307d8850f501ac008e886eec1fd1932a34 # v5.3.0
with:
go-version: '1.22'
- run: go install github.com/sumup/go-sdk-gen/cmd/go-sdk-gen@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: go-sdk-gen generate --mod github.com/sumup/sumup-go --pkg sumup --name SumUp ./openapi.json
- uses: EndBug/add-and-commit@a94899bca583c204427a224a7af87c02f9b325d5 # v9.1.4
with:
add: .
message: "chore: generate code"
default_author: github_actions