chore: add SpaceWar game in Games list #170
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: Linter GitHub Action | |
on: | |
push: | |
branches-ignore: | |
- 'ga-ignore-**' | |
- 'gh-pages' | |
permissions: | |
contents: write | |
jobs: | |
lint_code: | |
name: Lint with clang-format | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install clang-format | |
run: sudo apt-get install -y clang-format | |
- name: Run clang-format | |
run: | | |
git ls-files -z "*.cpp" "*.hpp" | while IFS= read -rd '' f; do tail -c1 < "$f" | read -r _ || echo >> "$f"; done | |
find . -iname '*.hpp' -o -iname '*.cpp' | xargs clang-format -i | |
- name: Set up Git and Push changes | |
env: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git commit -m "style: apply linter" || true | |
git push || true |