Skip to content

Commit 96d6c51

Browse files
author
Soren Ptak
committedJul 21, 2023
Update the uncrustify bot
1 parent ecd1307 commit 96d6c51

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed
 

‎.github/workflows/uncrustify.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ jobs:
88
Uncrustify:
99
name: Run_Uncrustify
1010
if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }}
11-
runs-on: ubuntu-latest
11+
runs-on: ubuntu-20.04
1212
steps:
1313
- name: Dump GitHub context
1414
env:
1515
GITHUB_CONTEXT: ${{ toJson(github) }}
1616
run: echo "$GITHUB_CONTEXT"
1717
- name: Install Utils
1818
run: |
19-
apt-get update && apt-get --assume-yes install software-properties-common curl jq sed
20-
add-apt-repository ppa:git-core/ppa
21-
apt-get update && apt-get --assume-yes install git
19+
sudo apt-get update && sudo apt-get --assume-yes install software-properties-common curl jq sed
20+
sudo add-apt-repository ppa:git-core/ppa
21+
sudo apt-get update && sudo apt-get --assume-yes install git
2222
git --version
2323
- name: get pullrequest url
2424
run: |
@@ -43,15 +43,15 @@ jobs:
4343
run: |
4444
: # Install Uncrustify
4545
echo "::group::Install Uncrustify"
46-
sudo apt-get update && apt-get --assume-yes install uncrustify
46+
sudo apt-get update && sudo apt-get --assume-yes install uncrustify
4747
echo "::endgroup::"
4848
- name: Run Uncrustify
4949
run: |
5050
: # Uncrustify on C files while ignoring symlinks.
5151
: # Make a collapsible section in the log to run uncrustify
5252
echo "::group::Uncrustify Check"
5353
uncrustify --version
54-
find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} +
54+
find . -iname "*.[ch]" | xargs uncrustify --no-backup --replace --if-changed -c tools/uncrustify.cfg -l C
5555
echo "::endgroup::"
5656
echo -e "\033[32;3mUncrustify Formatting Applied\033[0m"
5757
- name: Push changes to upstream repository

0 commit comments

Comments
 (0)
Please sign in to comment.