Skip to content
This repository has been archived by the owner on May 20, 2023. It is now read-only.

Formatting CI

Formatting CI #116

Workflow file for this run

name: Formatting CI
on:
push:
branches: [ "**" ]
pull_request:
branches: [ "**" ]
schedule:
- cron: '0 3 * * *'
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with: {ref: ""}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Formatting the code
run: ./gradlew spotlessApply
- name: Compile and run tests on robot code
run: ./gradlew spotlessCheck
- name: Commit back to GitHub
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}}
run: |
git config --global user.name "github-actiuons[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add -A
if ! git diff-index --quiet HEAD; then
git commit -m "Formatting"
git push -u origin ${GITHUB_REF}
fi