From 1da0ac1ecb37e748c0668d65ac0f20b130de717b Mon Sep 17 00:00:00 2001 From: Abel Soares Siqueira Date: Thu, 30 May 2024 16:05:57 +0200 Subject: [PATCH] =?UTF-8?q?chore:=20=F0=9F=A4=96=20Fix=20PreCommitUpdate?= =?UTF-8?q?=20workflow?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The command pre-commit autoupdate returns 1 whenever there is a change. We are going to ignore that. --- .github/workflows/PreCommitUpdate.yml | 4 +++- template/.github/workflows/PreCommitUpdate.yml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/PreCommitUpdate.yml b/.github/workflows/PreCommitUpdate.yml index cfafbbe2..6cf6d7d9 100644 --- a/.github/workflows/PreCommitUpdate.yml +++ b/.github/workflows/PreCommitUpdate.yml @@ -17,7 +17,9 @@ jobs: - name: Install pre-commit run: pip install pre-commit - name: Run pre-commit's autoupdate - run: pre-commit autoupdate + run: | + # autoupdate returns 1 if any changes were made + pre-commit autoupdate && "No updates" - name: Create Pull Request id: cpr uses: peter-evans/create-pull-request@v6 diff --git a/template/.github/workflows/PreCommitUpdate.yml b/template/.github/workflows/PreCommitUpdate.yml index cfafbbe2..6cf6d7d9 100644 --- a/template/.github/workflows/PreCommitUpdate.yml +++ b/template/.github/workflows/PreCommitUpdate.yml @@ -17,7 +17,9 @@ jobs: - name: Install pre-commit run: pip install pre-commit - name: Run pre-commit's autoupdate - run: pre-commit autoupdate + run: | + # autoupdate returns 1 if any changes were made + pre-commit autoupdate && "No updates" - name: Create Pull Request id: cpr uses: peter-evans/create-pull-request@v6