[ci] Run gha fmt in docker (#2511)

* [ci] Run gha fmt in docker

* use cargo run instead action
This commit is contained in:
Alexander Samusev
2023-05-03 14:10:46 +02:00
committed by GitHub
parent d904495ebb
commit 0004d04477
+3 -21
View File
@@ -13,28 +13,10 @@ jobs:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
container:
image: paritytech/ci-linux:production
steps:
- name: Install Rust nightly toolchain
uses: actions-rs/toolchain@b2417cde72dcf67f306c0ae8e0828a81bf0b189f # v1.0.7
with:
profile: minimal
toolchain: nightly
override: true
components: clippy, rustfmt
- name: Cache Dependencies & Build Outputs
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3.3.1
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3.5.2
- name: Cargo fmt
uses: actions-rs/cargo@ae10961054e4aa8b4aa7dffede299aaf087aa33b # v1.0.3
with:
command: fmt
args: --all -- --check
run: cargo +nightly fmt --all -- --check