ci: GH-17 Automating regular spec updates #20
Workflow file for this run
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: CI | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| validate: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.13' | |
| - name: Install openapi-spec-validator | |
| run: pip install openapi-spec-validator | |
| - name: Fix spec | |
| run: make fix | |
| - name: Validate OpenAPI patch files | |
| run: openapi-spec-validator tools/all-fixed.json | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| - name: Generate SDK | |
| run: make all | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n $(git status --porcelain) ]]; then | |
| echo "::error::SDK changes detected. Make sure you have pushed all generated changes" && exit 1 | |
| fi |