From 8bbb18bd761c6c4fc7028a23cce54a35e911bfc5 Mon Sep 17 00:00:00 2001 From: Alexander van Zyl Date: Wed, 12 Oct 2022 21:53:33 +0200 Subject: [PATCH] Use actions-rs for formatting --- .github/workflows/format.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml index e568177..3aa2ffa 100644 --- a/.github/workflows/format.yml +++ b/.github/workflows/format.yml @@ -12,10 +12,19 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - name: Install nightly - run: rustup install nightly - - name: Run rustfmt - run: cargo +nightly fmt --all + - name: Get nightly toolchain + uses: actions-rs/toolchain@v1 + with: + toolchain: nightly + override: true + profile: minimal + components: rustfmt + - name: Run cargo fmt + uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + - name: Push changes run: | if [[ $(git diff --stat) != '' ]]; then