File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Nightly rustfmt
2+ on :
3+ schedule :
4+ - cron : " 0 0 * * 0" # runs weekly on Sunday at 00:00
5+ workflow_dispatch : # allows manual triggering
6+ jobs :
7+ format :
8+ name : Nightly rustfmt
9+ runs-on : ubuntu-24.04
10+ steps :
11+ - uses : actions/checkout@v5
12+ - uses : dtolnay/rust-toolchain@nightly
13+ with :
14+ components : rustfmt
15+ - name : Run Nightly rustfmt
16+ # Run the formatter and manually remove trailing whitespace.
17+ run : cargo +nightly fmt && git ls-files -- '*.rs' -z | xargs sed -E -i'' -e 's/[[:space:]]+$//'
18+ - name : Get the current date
19+ run : echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
20+ - name : Create Pull Request
21+ uses : peter-evans/create-pull-request@v7
22+ with :
23+ author : Fmt Bot <bot@example.com>
24+ title : Automated nightly rustfmt (${{ env.date }})
25+ body : |
26+ Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
27+ commit-message : ${{ env.date }} automated rustfmt nightly
28+ labels : rustfmt
You can’t perform that action at this time.
0 commit comments