Skip to content

Commit 24b0e69

Browse files
committed
.github: fix automated update in CI
Automated dependencies update in CI was failing whenever no new changes were detected since git diff was returning 1. Signed-off-by: Damien Grisonnet <[email protected]>
1 parent 89b5708 commit 24b0e69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/versions.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ jobs:
3535
make generate
3636
3737
# Reset jsonnetfile.lock.json if no dependencies were updated
38-
changedFiles=$(git diff --name-only | grep -v 'jsonnetfile.lock.json')
39-
if [[ $changedFiles == "" ]]; then
38+
changedFiles=$(git diff --name-only | grep -v 'jsonnetfile.lock.json' | wc -l)
39+
if [[ "$changedFiles" -eq 0 ]]; then
4040
git checkout -- jsonnetfile.lock.json;
4141
fi
4242
- name: Create Pull Request

0 commit comments

Comments
 (0)