Skip to content

Commit

Permalink
CI: Add a job to check for formatting changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Oct 8, 2024
1 parent 408592a commit 4e74318
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Format
on:
pull_request:

jobs:
format:
runs-on: ubuntu-latest
container:
image: swift:6.0.1-jammy
steps:
- uses: actions/checkout@v4
- name: Check for formatting changes
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git diff --exit-code || {
echo "::error::The formatting changed some files. Please run \`./Utilities/format.sh\` and commit the changes."
exit 1
}

0 comments on commit 4e74318

Please sign in to comment.