From 05cdce38ea5f693065544a3c8f7b8bfb67796b30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ensar=20Saraj=C4=8Di=C4=87?= Date: Wed, 24 Jan 2024 17:01:00 +0100 Subject: [PATCH] Upload new baseline when lint fails --- .github/workflows/pr.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 34054f72..0596c62e 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -14,7 +14,17 @@ jobs: java-version: 17 distribution: 'temurin' - name: Run Android lint + id: lint run: ./gradlew lint + - name: Update baseline + if: ${{ failure() && steps.lint.conclusion == 'failure' }} + run: ./gradlew updateLintBaseline + - name: Upload new baseline + uses: actions/upload-artifact@v4 + if: ${{ failure() && steps.lint.conclusion == 'failure' }} + with: + name: 'new-lint-baseline' + path: 'app/lint-baseline.xml' - name: Upload results uses: actions/upload-artifact@v4 if: ${{ !cancelled() }}