fix(cec): support HDMI-CEC display power on Pi 4/5 second micro-HDMI port #2697
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: Generate OpenAPI Schema | |
| on: | |
| push: | |
| branches: | |
| - master | |
| paths: | |
| - '**' | |
| - '!.editorconfig' | |
| - '!website/**' | |
| - '!.github/workflows/deploy-website.yaml' | |
| - '!.github/workflows/build-balena-disk-image.yaml' | |
| - '!.github/workflows/python-lint.yaml' | |
| - '!.github/release.yml' | |
| - '!.github/dependabot.yml' | |
| - '!README.md' | |
| - '!CONTRIBUTING.md' | |
| - '!docs/**' | |
| - '!bin/install.sh' | |
| - '!bin/upgrade_containers.sh' | |
| - '!tests/**' | |
| - '!.cursor/**' | |
| - '!.claude/**' | |
| # rpi-imager generator and the bun installer script don't | |
| # affect schema generation; skip runs that only touch them. | |
| - '!tools/raspberry_pi_imager/**' | |
| - '!.github/workflows/scripts/install-bun.sh' | |
| pull_request: | |
| branches: | |
| - master | |
| paths: | |
| - '**' | |
| - '!.editorconfig' | |
| - '!website/**' | |
| - '!.github/workflows/deploy-website.yaml' | |
| - '!.github/workflows/build-balena-disk-image.yaml' | |
| - '!.github/workflows/python-lint.yaml' | |
| - '!.github/release.yml' | |
| - '!.github/dependabot.yml' | |
| - '!README.md' | |
| - '!CONTRIBUTING.md' | |
| - '!docs/**' | |
| - '!bin/install.sh' | |
| - '!bin/upgrade_containers.sh' | |
| - '!tests/**' | |
| - '!.cursor/**' | |
| - '!.claude/**' | |
| # rpi-imager generator and the bun installer script don't | |
| # affect schema generation; skip runs that only touch them. | |
| - '!tools/raspberry_pi_imager/**' | |
| - '!.github/workflows/scripts/install-bun.sh' | |
| workflow_call: | |
| inputs: | |
| ref: | |
| description: >- | |
| Git ref to check out before generating the schema. Defaults to | |
| the workflow's default ref (master push / PR head). The | |
| release-triggered disk-image workflow passes the release tag | |
| here so the OpenAPI schema attached to the release matches | |
| the rest of the release artefacts. | |
| required: false | |
| type: string | |
| default: '' | |
| jobs: | |
| generate-openapi-schema: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| COMPOSE_FILE: docker-compose.dev.yml | |
| steps: | |
| # Resolve the checkout ref before invoking actions/checkout so | |
| # the `inputs` context (only populated under workflow_call) is | |
| # only read in one place, with `github.ref` as the fallback for | |
| # push/PR runs. INPUT_REF is empty on push/PR events because | |
| # the `inputs` context isn't populated there — `${{ inputs.ref }}` | |
| # interpolates to an empty string in that case rather than | |
| # erroring. | |
| - name: Resolve checkout ref | |
| id: ref | |
| env: | |
| INPUT_REF: ${{ inputs.ref }} | |
| DEFAULT_REF: ${{ github.ref }} | |
| run: | | |
| if [[ -n "$INPUT_REF" ]]; then | |
| echo "ref=$INPUT_REF" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "ref=$DEFAULT_REF" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Checkout | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6 | |
| with: | |
| ref: ${{ steps.ref.outputs.ref }} | |
| - name: Set up Python 3.13 | |
| uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6 | |
| with: | |
| python-version: "3.13" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 | |
| with: | |
| version: '0.9.17' | |
| - name: Install dependencies | |
| run: | | |
| uv venv | |
| uv pip install --group docker-image-builder | |
| - name: Cache Docker layers | |
| uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5 | |
| id: cache | |
| with: | |
| path: /tmp/.buildx-cache | |
| key: ${{ runner.os }}-x86 | |
| restore-keys: | | |
| ${{ runner.os }}-x86 | |
| - name: Build Images | |
| run: | | |
| uv run python -m tools.image_builder \ | |
| --dockerfiles-only \ | |
| --disable-cache-mounts \ | |
| --environment=development | |
| docker compose build | |
| - name: Start the Containers | |
| run: | | |
| docker compose up -d | |
| - name: Generate OpenAPI Schema | |
| run: | | |
| docker compose exec anthias-server \ | |
| python -m anthias_server.manage spectacular \ | |
| --format openapi-json \ | |
| --file anthias-api-schema.json | |
| - name: Upload the OpenAPI Schema | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: anthias-api-schema | |
| path: anthias-api-schema.json |