From af5b8c181a6099c30f08dd72c5d0df533ac1d4a4 Mon Sep 17 00:00:00 2001 From: Gwilym Kuiper Date: Thu, 24 Feb 2022 20:30:15 +0000 Subject: [PATCH] Handle no updates --- .github/scripts/update-lockfiles.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/scripts/update-lockfiles.sh b/.github/scripts/update-lockfiles.sh index 7ffd89d8..11ae32dc 100755 --- a/.github/scripts/update-lockfiles.sh +++ b/.github/scripts/update-lockfiles.sh @@ -11,5 +11,12 @@ update_lockfiles update_lockfiles update_lockfiles -git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -a -m 'Update lockfiles' +git add -u + +if [ "$(git diff --cached --name-only)" == '' ]; then + echo "No files updated" + exit 0 +fi + +git -c user.name="GBA bot" -c user.email="gw@ilym.me" commit -m 'Update lockfiles' git push