Skip to content

feat: Caching docker images github actions #34

feat: Caching docker images github actions

feat: Caching docker images github actions #34

Workflow file for this run

name: Clang-Format
on: [push]
jobs:
clang-format:
name: Clang-Format
runs-on: ubuntu-latest
permissions:
contents: write
environment: ${{ github.actor }}_environment
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
persist-credentials: false
fetch-depth: 0
- name: Set up Clang-Format
run: sudo apt-get install -y clang-format
with:

Check failure on line 22 in .github/workflows/clang-format.yml

View workflow run for this annotation

GitHub Actions / Clang-Format

Invalid workflow file

The workflow is not valid. .github/workflows/clang-format.yml (Line: 22, Col: 9): Unexpected value 'with'
cache: 'yarn'
cache-dependency-path: yarn.lock
- name: Format source code
run: clang-format -i game/**/*.cpp game/**/*.hpp --ferror-limit=0 --style file:.clang-format --verbose
- name: Format tests
run: clang-format -i tests/**/*.cpp tests/**/*.hpp --ferror-limit=0 --style file:.clang-format --verbose
- name: Check for modifications
id: check_modifications
run: |
git diff --exit-code > /dev/null || echo "modified=true" >> $GITHUB_ENV
- name: Commit and push changes
if: env.modified == 'true'
run: |
git config --global user.email "${{ github.event.commits[0].author.email }}"
git config --global user.name "${{ github.event.commits[0].author.name }}"
git commit -a -m "Autoformat code"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}