Skip to content

Commit c79b828

Browse files
Merge pull request #2732 from simonpasquier/fix-versions-job
chore: fix versions workflow
2 parents 0e96d75 + d4e256d commit c79b828

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/versions.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,9 @@ jobs:
5858
make update
5959
make generate
6060
61-
# Reset jsonnetfile.lock.json if no dependencies were updated
62-
changedFiles=$(git diff --name-only | grep -vc 'jsonnetfile.lock.json')
63-
if [[ "$changedFiles" -eq 0 ]]; then
61+
# Reset jsonnetfile.lock.json if no dependencies were updated.
62+
# grep returns 0 when it matches at least 1 line in the diff output.
63+
if ! git diff --name-only | grep -qv 'jsonnetfile.lock.json'; then
6464
git checkout -- jsonnetfile.lock.json;
6565
fi
6666
- name: Create Pull Request

0 commit comments

Comments
 (0)