Auto-commit clang format #248
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: Check/apply clang-format | |
on: | |
push: | |
branches: | |
- 'trunk' | |
pull_request: | |
jobs: | |
clang-format: | |
runs-on: ubuntu-latest | |
steps: | |
- name : Install just | |
uses: extractions/setup-just@v2 | |
with: | |
just-version: 1.26.0 | |
- uses: actions/checkout@v4 | |
- name: Run format check on the C++ | |
run: just install-denv init format-cpp | |
- name: Auto-commit the changes | |
run: | | |
git config user.name 'github-actions[bot]' | |
git config user.email 'github-actions[bot]@users.noreply.github.com' | |
git add . | |
git commit -m "Apply clang-format" || echo "No changes to commit" | |
git push origin HEAD:${{ github.head_ref }} |