Update support for tests #332
Workflow file for this run
This file contains 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 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 '[email protected]' | |
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 | |