Migrate to Bzlmod (fixes #153) #581
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: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Run format.sh | |
run: ./format.sh | |
- name: Check formatting diff | |
run: | | |
CHANGED_FILES="$(git diff-index --name-only HEAD --)" | |
if [[ -z "${CHANGED_FILES}" ]]; then | |
echo "Success: no formatting changes needed." | |
exit 0 | |
fi | |
echo "Found formatting changes in the following files:" | |
echo "${CHANGED_FILES}" | |
echo "" | |
echo "Please run format.sh to apply the changes." | |
exit 1 |