update ci
This commit is contained in:
parent
ecd950970a
commit
fd56ade4ed
|
@ -38,7 +38,15 @@ jobs:
|
|||
with:
|
||||
command: build
|
||||
|
||||
- name: cargo clippy
|
||||
- name: rustfmt
|
||||
if: always()
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all --check
|
||||
|
||||
- name: clippy
|
||||
if: always()
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: clippy
|
||||
|
|
|
@ -1,49 +0,0 @@
|
|||
name: Rust fmt
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
paths-ignore:
|
||||
- '*.md'
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
|
||||
jobs:
|
||||
fmt:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup GIT
|
||||
run: |
|
||||
git config --global user.name "MedzikUserBot"
|
||||
git config --global user.email "rm99iv9s@duck.com"
|
||||
|
||||
- name: Setup Rust toolchain
|
||||
uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
profile: minimal
|
||||
toolchain: stable
|
||||
override: true
|
||||
components: rustfmt, clippy
|
||||
|
||||
- name: cargo fmt
|
||||
uses: actions-rs/cargo@v1
|
||||
with:
|
||||
command: fmt
|
||||
args: --all
|
||||
|
||||
- name: Commit changes
|
||||
run: |
|
||||
git add .
|
||||
git diff-index --quiet HEAD || git commit -m "rustfmt"
|
||||
|
||||
- name: Push changes
|
||||
uses: ad-m/github-push-action@a3fd843e49cd58d296bdd2431c4853569a1b900f
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
branch: 'main'
|
Loading…
Reference in New Issue