From a8ca14c3e7673aec4411f2ef6dff4a8d044972f1 Mon Sep 17 00:00:00 2001 From: Leonard Lesinski Date: Thu, 20 Jun 2024 20:27:56 +0200 Subject: [PATCH] Added automated code formatting --- .github/workflows/format.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/format.yml diff --git a/.github/workflows/format.yml b/.github/workflows/format.yml new file mode 100644 index 0000000..a220e35 --- /dev/null +++ b/.github/workflows/format.yml @@ -0,0 +1,25 @@ +name: Automated Code Formatting + +on: + push: + branches: + - "*" + - "*/*" + - "**" + +jobs: + format: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - name: Install cargo fmt + run: cargo install --force rustfmt + - name: Format code + run: cargo fmt --all -- --check + - name: Create Pull Request + uses: peter-evans/create-pull-request@v6 \ No newline at end of file