From 32100214e629487d542c3e8d22c5b548d1aea636 Mon Sep 17 00:00:00 2001 From: Soren Ptak Date: Fri, 21 Jul 2023 09:49:25 -0700 Subject: [PATCH] Update the uncrustify bot (#975) Co-authored-by: Soren Ptak --- .github/workflows/uncrustify.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/uncrustify.yml b/.github/workflows/uncrustify.yml index ca42c1447..e5b703500 100644 --- a/.github/workflows/uncrustify.yml +++ b/.github/workflows/uncrustify.yml @@ -8,7 +8,7 @@ jobs: Uncrustify: name: Run_Uncrustify if: ${{ github.event.issue.pull_request && github.event.comment.body == '/bot run uncrustify' }} - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 steps: - name: Dump GitHub context env: @@ -16,9 +16,9 @@ jobs: run: echo "$GITHUB_CONTEXT" - name: Install Utils run: | - apt-get update && apt-get --assume-yes install software-properties-common curl jq sed - add-apt-repository ppa:git-core/ppa - apt-get update && apt-get --assume-yes install git + sudo apt-get update && sudo apt-get --assume-yes install software-properties-common curl jq sed + sudo add-apt-repository ppa:git-core/ppa + sudo apt-get update && sudo apt-get --assume-yes install git git --version - name: get pullrequest url run: | @@ -43,7 +43,7 @@ jobs: run: | : # Install Uncrustify echo "::group::Install Uncrustify" - sudo apt-get update && apt-get --assume-yes install uncrustify + sudo apt-get update && sudo apt-get --assume-yes install uncrustify echo "::endgroup::" - name: Run Uncrustify run: | @@ -51,7 +51,7 @@ jobs: : # Make a collapsible section in the log to run uncrustify echo "::group::Uncrustify Check" uncrustify --version - find . -iname "*.[hc]" -exec uncrustify -c tools/uncrustify.cfg --no-backup --replace {} + + find . -iname "*.[ch]" | xargs uncrustify --no-backup --replace --if-changed -c tools/uncrustify.cfg -l C echo "::endgroup::" echo -e "\033[32;3mUncrustify Formatting Applied\033[0m" - name: Push changes to upstream repository