Skip to content

Commit 6d43144

Browse files
committed
ci: auto-commit rustfmt fixes via dedicated workflow
1 parent d62acc5 commit 6d43144

2 files changed

Lines changed: 23 additions & 10 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,16 +10,6 @@ env:
1010
RUSTFLAGS: -D warnings
1111

1212
jobs:
13-
fmt:
14-
name: rustfmt
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v6
18-
- uses: dtolnay/rust-toolchain@stable
19-
with:
20-
components: rustfmt
21-
- run: cargo fmt --all -- --check
22-
2313
clippy:
2414
name: clippy
2515
runs-on: ubuntu-latest

.github/workflows/rustfmt.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: rustfmt
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
rustfmt:
13+
name: auto rustfmt
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v7
17+
- uses: dtolnay/rust-toolchain@stable
18+
with:
19+
components: rustfmt
20+
- run: cargo fmt --all
21+
- uses: stefanzweifel/git-auto-commit-action@v7
22+
with:
23+
commit_message: "style: apply rustfmt"

0 commit comments

Comments
 (0)