From e10f6258156601b34aca26892b62ffefc8e1fed5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1lm=C3=A1n=20=E2=80=9EKAMI=E2=80=9D=20Szalai?= Date: Sun, 8 Mar 2026 07:36:45 +0100 Subject: [PATCH] Skip commit and push when playlist has no changes Prevents the workflow from failing with exit code 1 when the generated playlist is identical to the previous run and there is nothing to commit. --- .github/workflows/update_playlist.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/update_playlist.yml b/.github/workflows/update_playlist.yml index 0ede514..af5c244 100644 --- a/.github/workflows/update_playlist.yml +++ b/.github/workflows/update_playlist.yml @@ -17,5 +17,5 @@ jobs: git config user.email "playlistbot@users.noreply.github.com" || true python3 ./make_playlist.py git add . - git commit --quiet -m "Update Playlist (GitHub Actions)" - git push -f origin master + git diff --staged --quiet || git commit --quiet -m "Update Playlist (GitHub Actions)" + git diff --quiet HEAD origin/master || git push -f origin master