Skip to content

Commit

Permalink
Update the uncrustify bot (#975)
Browse files Browse the repository at this point in the history
Co-authored-by: Soren Ptak <skptak@amazon.com>
  • Loading branch information
Skptak and Soren Ptak authored Jul 21, 2023
1 parent f89112c commit 3210021
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/uncrustify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ 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:
GITHUB_CONTEXT: ${{ toJson(github) }}
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: |
Expand All @@ -43,15 +43,15 @@ 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: |
: # Uncrustify on C files while ignoring symlinks.
: # 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
Expand Down

0 comments on commit 3210021

Please sign in to comment.