add intellij reformatter on pull requests #3
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Re-format Code | |
on: | |
pull_request: | |
branches: | |
- main | |
jobs: | |
format: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install IntelliJ IDEA | |
run: | | |
wget -q -O idea.tar.gz https://download.jetbrains.com/idea/ideaIC-2024.1.1.tar.gz | |
tar -xzf idea.tar.gz | |
- name: Format code | |
run: | | |
./*/bin/format.sh */src | |
- name: Commit changes | |
run: | | |
git config --global user.name 'ben reed' | |
git config --global user.email '[email protected]' | |
git add . | |
git commit -m "Auto-format code" | |
git push | |