Change formatting a bit and add formatting forgejo action.
Some checks are pending
Format code / Format the kernel (push) Waiting to run
Some checks are pending
Format code / Format the kernel (push) Waiting to run
This commit is contained in:
parent
3b7fa25cd2
commit
9881b01a33
3 changed files with 22 additions and 6 deletions
|
@ -1,6 +0,0 @@
|
|||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: docker
|
||||
steps:
|
||||
- run: echo All Good
|
20
.forgejo/workflows/format.yml
Normal file
20
.forgejo/workflows/format.yml
Normal 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
|
||||
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue