File tree Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Expand file tree Collapse file tree 1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -43,36 +43,17 @@ jobs:
43
43
steps :
44
44
- name : Checkout repository
45
45
uses : actions/checkout@v3
46
- with :
47
- ref : ${{ github.event.pull_request.head.ref }}
48
- repository : ${{ github.event.pull_request.head.repo.full_name }}
49
46
50
-
51
47
- name : Install Rust
52
48
uses : dtolnay/rust-toolchain@master
53
49
with :
54
50
toolchain : nightly
55
51
components : rustfmt
56
52
57
- - name : Check formatting for forked pull requests
58
- if : ${{ github.event.pull_request.head.repo.full_name != github.event.pull_request.base.repo.full_name }}
53
+ - name : Check formatting
59
54
shell : bash
60
55
run : cargo +nightly fmt --all --check
61
56
62
- - name : Run formatter
63
- if : ${{ github.event.pull_request.head.repo.full_name == github.event.pull_request.base.repo.full_name }}
64
- shell : bash
65
- run : |
66
- cargo +nightly fmt --all
67
- if ! git diff --exit-code --quiet -- crates; then
68
- echo "::notice::Formatting check failed"
69
- git config --local user.name 'github-actions[bot]'
70
- git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
71
- git add crates
72
- git commit --message 'chore: run formatter'
73
- git push
74
- fi
75
-
76
57
check-msrv :
77
58
name : Check compilation on MSRV toolchain
78
59
runs-on : ${{ matrix.os }}
You can’t perform that action at this time.
0 commit comments