From a096230a9c9e2ef123f4e1824b34111232efb9f3 Mon Sep 17 00:00:00 2001 From: "Jun Siang Cheah (aider)" Date: Sun, 1 Sep 2024 22:52:29 +0100 Subject: [PATCH] chore: Add check for changes before committing and creating PR --- .github/workflows/update-readme.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/update-readme.yml b/.github/workflows/update-readme.yml index b6cc8f6..66c44c6 100644 --- a/.github/workflows/update-readme.yml +++ b/.github/workflows/update-readme.yml @@ -28,12 +28,18 @@ jobs: - name: Run script run: | python src/pull_available_models.py + - name: Check for changes + id: changes + run: | + git diff --exit-code - name: Commit changes + if: steps.changes.outputs.exit_code != '0' uses: stefanzweifel/git-auto-commit-action@v5 with: commit_message: "Update README with latest models" branch: update-readme - name: Create Pull Request + if: steps.changes.outputs.exit_code != '0' uses: peter-evans/create-pull-request@v5 with: title: "Update README with latest models"