Change formatting a bit and add formatting forgejo action.
Some checks are pending
Format code / Format the kernel (push) Waiting to run

This commit is contained in:
Arthur Beck 2025-02-22 20:14:27 -06:00
parent 3b7fa25cd2
commit 9881b01a33
Signed by: ArthurB
GPG key ID: ACE3D14F5CEF14BF
3 changed files with 22 additions and 6 deletions

View file

@ -1,6 +0,0 @@
on: [push]
jobs:
test:
runs-on: docker
steps:
- run: echo All Good

View file

@ -0,0 +1,20 @@
name: Format code
on: [push]
jobs:
format-kernel:
name: Format the kernel
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@nightly
- run: |
cd kernel
./format
- name: Commit format
run: |
git config --global user.name 'Formatter'
git config --global user.email 'formatter@noreply.git.verygay.fyi'
git commit -am "Automated format"
git push

View file

@ -135,6 +135,8 @@
if [[ $format = "true" ]]; then
echo "[INFO] Formatting"
pushd . 2>&1 > /dev/null
cd "$APHRODITE_DIR"
cargo fmt --all
exit 0
fi