diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index b536702..59918a4 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -12,9 +12,9 @@ jobs: format: runs-on: ubuntu-latest steps: - - name: Checkout + - name: ๐Ÿš€ Checkout uses: actions/checkout@v4 - - name: Setup Bazel + - name: ๐ŸŒฟ Setup Bazel uses: bazel-contrib/setup-bazel@0.8.0 with: bazelisk-cache: true @@ -24,15 +24,16 @@ jobs: build --color=yes build --show_timestamps - run: touch /tmp/pre_fmt - - name: Format Repository + - name: ๐Ÿงน Format Repository run: bazel run //:format - - name: Detect Diff + - name: ๐Ÿ‘€ Detect Diff run: | set +x - formatted_files=$(find ./config ./src ./tools -newer /tmp/pre_fmt | wc -l) + formatted_files=$(find ./config ./src ./tools -newer /tmp/pre_fmt) + num_formatted_files=$(echo $formatted_files | wc -l) - if [ "$formatted_files" -gt 0 ]; then - echo "Bad code detected! The following files would be reformatted:" + if [ "$num_formatted_files" -gt 0 ]; then + echo "โŒ๐Ÿ”ฅ Bad code detected! The following files would be reformatted:" echo "$formatted_files" exit 1 fi