Add the Scala formatter with GitHub Actions #1
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: format | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
scalafmt: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Mill Installation | |
run: | | |
sudo curl -L https://github.com/com-lihaoyi/mill/releases/download/0.11.1/0.11.1 > /usr/local/bin/mill | |
chmod +x /usr/local/bin/mill | |
- name: Scala Formatter | |
make format | |
- name: Commit and Push | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then | |
git config user.name github-actions | |
git config user.email [email protected] | |
git add . | |
git commit -m "make format" | |
git push | |
fi |