Skip to content

Rewrite workflow

Rewrite workflow #6

Workflow file for this run

on:
pull_request:
branches:
- master
- dev
- radrow/gh-65
name: Rustfmt Check
jobs:
format:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:

Check failure on line 19 in .github/workflows/rustfmt.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/rustfmt.yml

Invalid workflow file

You have an error in your yaml syntax on line 19
ssh-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Cache Cargo build
uses: actions/cache@v3
with:
path: ~/.cargo/bin
key: ${{ runner.os }}-cargo-bin-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-bin-
- name: Setup Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: rustfmt
toolchain: nightly
- name: Run rustfmt
run: cargo fmt --all -- --check
- name: Complete Check
if: failure()
run: echo "Bad formatting. Please run `cargo fmt`"