Skip to content

Commit 96a65ed

Browse files
committed
add auto-format action to CI
1 parent b4fe491 commit 96a65ed

File tree

2 files changed

+22
-1
lines changed

2 files changed

+22
-1
lines changed

.github/workflows/all-checks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ jobs:
1616
delay: '3'
1717
retries: '45'
1818
polling_interval: '1'
19-
checks_exclude: 'devflow/merge,dd-gitlab/default-pipeline'
19+
checks_exclude: 'devflow/merge,dd-gitlab/default-pipeline,Rustfmt Auto / rustfmt'

.github/workflows/rustfmt-auto.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Rustfmt Auto
2+
on:
3+
pull_request:
4+
5+
jobs:
6+
rustfmt:
7+
runs-on: ubuntu-latest
8+
if: ${{ !startsWith(github.head_ref, 'mq-working-branch') }}
9+
permissions:
10+
contents: write
11+
steps:
12+
- name: Checkout sources
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
14+
with:
15+
ref: ${{ github.head_ref }}
16+
- name: Install nightly-2026-02-08 toolchain and rustfmt
17+
run: rustup install nightly-2026-02-08 && rustup default nightly-2026-02-08 && rustup component add rustfmt
18+
- name: Run rustfmt and commit changes
19+
uses: mbrobbel/rustfmt-check@e7ac5685995bd39fb14f6c83fa6f10627e92e680 # master
20+
with:
21+
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)