feat: book the parcel the buyer paid for, and take the carrier's own … #13
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: OpenAPI spec check | |
| # Regenerate api/openapi.gen.yaml from the base doc + module fragments and fail if | |
| # it differs from the committed copy, so the served spec can never drift. | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| jobs: | |
| openapi-check: | |
| name: Verify generated spec is up to date | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Regenerate | |
| run: go generate ./... | |
| - name: Diff against the committed spec | |
| run: | | |
| if ! git diff --exit-code -- api/openapi.gen.yaml; then | |
| echo "::error::api/openapi.gen.yaml is stale. Run 'go generate ./...' and commit the result." | |
| exit 1 | |
| fi |