name: "Build" on: [pull_request, push] jobs: pre-commit-hooks: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v22 - uses: cachix/cachix-action@v12 with: name: devenv - uses: cachix/cachix-action@v12 with: name: alejandr0angul0-dev authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" - name: Run pre-commit hooks run: | git fetch origin nix develop --accept-flake-config --impure --command bash -c \ "pre-commit run --from-ref origin/main --to-ref $GITHUB_SHA" build: needs: pre-commit-hooks runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - uses: cachix/install-nix-action@v25 - uses: cachix/cachix-action@v14 with: name: alejandr0angul0-resume authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' - run: nix build - run: nix flake check - run: nix run