mirror of
https://github.com/CCExtractor/ccextractor.git
synced 2025-01-13 13:40:54 +00:00
1aed90e42c
Apply clang-format to all files aside from the icon file in the GUI and modify the action appropriately.
23 lines
550 B
YAML
23 lines
550 B
YAML
name: Format sourcecode
|
|
on:
|
|
push:
|
|
paths:
|
|
- '.github/workflows/format.yml'
|
|
- 'src/**.c'
|
|
- 'src/**.h'
|
|
pull_request:
|
|
types: [opened, synchronize, reopened]
|
|
paths:
|
|
- '.github/workflows/format.yml'
|
|
- 'src/**.c'
|
|
- 'src/**.h'
|
|
jobs:
|
|
format:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v1
|
|
- name: Format code
|
|
run: |
|
|
find src/ -type f -name '*.c' -not -path "src/GUI/icon_data.c" | xargs clang-format -i
|
|
git diff-index --quiet HEAD -- || (git diff && exit 1)
|