summaryrefslogtreecommitdiff
path: root/.github/workflows/format.yaml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/format.yaml')
-rw-r--r--.github/workflows/format.yaml26
1 files changed, 10 insertions, 16 deletions
diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml
index b0eaddd..e189f46 100644
--- a/.github/workflows/format.yaml
+++ b/.github/workflows/format.yaml
@@ -13,31 +13,25 @@ jobs:
steps:
- uses: actions/checkout@v3
- - uses: actions-rs/toolchain@v1
+ - name: setup nix & cachix
+ uses: ./.github/actions/setup-nix
with:
- profile: minimal
- toolchain: stable
- override: true
- components: clippy
+ cachix-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- name: run cargo fmt
- uses: actions-rs/cargo@v1
- with:
- command: fmt
- args: --all
-
- - uses: EndBug/add-and-commit@v9
- with:
- default_author: github_actions
- message: "chore: fmt rust files"
+ run: |
+ nix build -L .#checks.x86_64-linux.fmt
nix-fmt:
runs-on: ubuntu-latest
- needs: cargo-fmt
+ if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v3
- - uses: cachix/install-nix-action@v21
+ - name: setup nix & cachix
+ uses: ./.github/actions/setup-nix
+ with:
+ cachix-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix fmt