-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (31 loc) · 927 Bytes
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Format Code
on: push
permissions:
contents: write
defaults:
run:
working-directory: ./
jobs:
code-formatting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt, clippy
- name: Install Dependencies
run: cargo fetch --locked
- name: Run Formatter
run: cargo fmt --all
- name: Commit and Push Changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Apply Prettier formatting
commit_options: '--no-verify'
repository: .
commit_user_name: github-actions[bot]
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: GitHub Actions <actions@github.com>