Skip to content

Commit

Permalink
Make formatting fixes a downloadable artifact
Browse files Browse the repository at this point in the history
  • Loading branch information
fragglet committed Dec 17, 2024
1 parent 01e2c74 commit 33699c7
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,21 @@ jobs:
if: '!cancelled()'
run: |
clang-format -i */*.[ch]
if git diff | grep ""; then
(echo "Formatting errors detected by clang-format." \
"Please run \`make format\`.";
git diff > formatting-fixes.diff
if ! grep "" formatting-fixes.diff; then
rm -f formatting-fixes.diff
else
(echo "Formatting errors detected by clang-format. Please run" \
"\`make format\` or apply formatting-fixes.diff below.";
echo) >> $GITHUB_STEP_SUMMARY
false
fi
- uses: actions/upload-artifact@v4
if: '!cancelled()'
with:
if-no-files-found: ignore
name: formatting-fixes.diff
path: formatting-fixes.diff
- name: Check C89 compliance
if: '!cancelled()'
env:
Expand Down

0 comments on commit 33699c7

Please sign in to comment.