From f86f36f932151531a89db6493992753a1ac465bc Mon Sep 17 00:00:00 2001 From: Andrey Andreyevich Bienkowski Date: Sun, 6 Oct 2024 14:48:53 +0300 Subject: [PATCH] Update include-what-you-use.yml --- .github/workflows/include-what-you-use.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/include-what-you-use.yml b/.github/workflows/include-what-you-use.yml index a10bdd9c3..4abc190bc 100644 --- a/.github/workflows/include-what-you-use.yml +++ b/.github/workflows/include-what-you-use.yml @@ -22,8 +22,13 @@ jobs: run: set -o pipefail; iwyu_tool -j 4 -p build -- -Xiwyu --no_default_mapping -Xiwyu --mapping_file=$PWD/include-what-you-use.imp | tee build/build-log.txt - name: Apply include-what-you-use recommendations run: fix_include --nosafe_headers --ignore_re '/lib/' < build/build-log.txt + - name: Check if any files were changed + run: git diff --quiet && echo "has_diff=true" || echo "has_diff=false" >> "$GITHUB_OUTPUT" + id: has_diff - run: git diff > build/include-what-you-use-diff.txt + if: steps.has_diff.outputs.has_diff - name: Upload the diff + if: steps.has_diff.outputs.has_diff uses: actions/upload-artifact@v4 with: name: include-what-you-use-diff