Bump the actions group with 2 updates #235
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: Generated code check | |
| on: | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| staleness: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - uses: ./.github/actions/setup-uv | |
| - run: uv sync --group regen | |
| - name: Prepare spec | |
| run: | | |
| set -euo pipefail | |
| if [[ -f openapi-overlay.yaml ]]; then | |
| uv run oas-patch overlay openapi.json openapi-overlay.yaml -o /tmp/patched-spec.json | |
| else | |
| cp openapi.json /tmp/patched-spec.json | |
| fi | |
| - name: Regenerate client | |
| run: | | |
| uv run openapi-python-client generate \ | |
| --path /tmp/patched-spec.json \ | |
| --meta none \ | |
| --config openapi-python-client-config.yaml \ | |
| --custom-template-path custom-templates \ | |
| --output-path ionq_core \ | |
| --overwrite | |
| - name: Check for uncommitted changes | |
| run: | | |
| if [[ -n "$(git status --porcelain ionq_core/)" ]]; then | |
| echo "::error::Generated code is out of date. Run the generator and commit the results." | |
| git diff ionq_core/ | |
| exit 1 | |
| fi |