--- 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@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: persist-credentials: false - uses: dorny/paths-filter@668c092af3649c4b664c54e4b704aa46782f6f7c id: filter with: filters: | docs-pnpm: - 'doc/pnpm-lock.yaml' autofix: runs-on: blacksmith-2vcpu-ubuntu-2404 needs: check-changes env: UV_CACHE_DIR: /tmp/.uv-cache steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 with: persist-credentials: false - uses: ./.github/actions/setup-nix - name: Cache Cargo uses: actions/cache@v5 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@v5 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@635ffb0c9798bd160680f18fd73371e355b85f27