# yaml-language-server: $schema=https://www.schemastore.org/github-workflow.json name: autofix.ci on: pull_request: push: permissions: contents: read jobs: check-changes: runs-on: ubuntu-latest outputs: docs-pnpm: ${{ steps.filter.outputs.docs-pnpm }} steps: - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 with: persist-credentials: false - uses: dorny/paths-filter@61f87a10cd2c304679af17bb73ef192addf33c1c id: filter with: filters: | docs-pnpm: - 'doc/pnpm-lock.yaml' autofix: runs-on: ubuntu-latest needs: check-changes env: UV_CACHE_DIR: /tmp/.uv-cache steps: - uses: actions/checkout@0c366fd6a839edf440554fa01a7085ccba70ac98 with: persist-credentials: false - uses: ./.github/actions/setup-nix - name: Cache Cargo uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 with: path: | ~/.cargo/bin/ ~/.cargo/registry/index/ ~/.cargo/registry/cache/ ~/.cargo/git/db/ key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Cache uv uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 with: path: /tmp/.uv-cache key: uv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }} restore-keys: | uv-${{ runner.os }}-${{ hashFiles('**/uv.lock') }} uv-${{ runner.os }} - name: setup sqlx run: | nix develop -L -v -c sqlx database setup \ --source ./crates/core/src/cache/migrations/ - name: autofix sqlx run: nix develop -L -v -c cargo sqlx prepare --workspace - name: clippy --fix run: nix develop -L -v -c cargo clippy --fix - name: pre-commit run run: nix develop -L -v -c pre-commit run --all-files continue-on-error: true - name: Upgrade Hash if: ${{ needs.check-changes.outputs.docs-pnpm == 'true' }} run: bash ./doc/upgrade.sh - name: Minimise uv cache run: nix develop -L -v -c uv cache prune --ci - uses: autofix-ci/action@7a166d7532b277f34e16238930461bf77f9d7ed8