2023-10-21 13:37:24 +00:00
|
|
|
name: Nightly rustfmt
|
|
|
|
on:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 0 * * 0" # runs weekly on Sunday at 00:00
|
|
|
|
workflow_dispatch: # allows manual triggering
|
|
|
|
jobs:
|
|
|
|
format:
|
|
|
|
name: Nightly rustfmt
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: dtolnay/rust-toolchain@nightly
|
|
|
|
with:
|
|
|
|
components: rustfmt
|
|
|
|
- name: Run Nightly rustfmt
|
|
|
|
run: cargo +nightly fmt
|
|
|
|
- name: Get the current date
|
|
|
|
run: echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
|
|
|
|
- name: Create Pull Request
|
2024-02-05 10:29:03 +00:00
|
|
|
uses: peter-evans/create-pull-request@v6
|
2023-10-21 13:37:24 +00:00
|
|
|
with:
|
2023-11-20 04:10:40 +00:00
|
|
|
author: Fmt Bot <bot@example.com>
|
2023-10-21 13:37:24 +00:00
|
|
|
title: Automated nightly rustfmt (${{ env.date }})
|
|
|
|
body: |
|
|
|
|
Automated nightly `rustfmt` changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
|
|
|
|
commit-message: ${{ env.date }} automated rustfmt nightly
|
|
|
|
labels: rustfmt
|