Skip to content

push swagger from signadot #321

push swagger from signadot

push swagger from signadot #321

Workflow file for this run

name: Generate Go SDK
on:
push:
branches-ignore:
- 'generate*'
paths:
- 'generate/**'
pull_request:
branches:
- main
paths:
- 'generate/**'
env:
GO_VERSION: 1.21
jobs:
release-go-sdk:
name: "Generate Go SDK"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ${{ env.GO_VERSION }}
- name: Generate
run: |
cd generate
make
- name: Commit
run: |
if [[ $(git diff --exit-code client models go.mod go.sum) ]]; then
git config --global user.name 'Signadot'
git config --global user.email 'git@signadot.com'
git add client models go.mod go.sum
git commit -m "swagger generation"
branch=generate-${{ github.sha }}
git checkout -b $branch
git push --set-upstream origin $branch
else
echo "no changes"
fi