Skip to content

Commit c54b870

Browse files
Merge pull request #115 from simonpasquier/fix-grep-cmd
chore: fix grep command
2 parents d84f866 + 4cb37b1 commit c54b870

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/cmo-make-targets.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ jobs:
4848
run: make ${{ inputs.make-targets }}
4949
- name: Ignore if change is only in jsonnetfile.lock.json
5050
run: |
51-
# Reset jsonnetfile.lock.json if no dependencies were updated
52-
changedFiles=$(git diff --name-only | grep -cv 'jsonnetfile.lock.json')
53-
if [[ "$changedFiles" -eq 0 ]]; then
51+
# Reset jsonnetfile.lock.json if no dependencies were updated.
52+
# grep returns 0 when it matches at least 1 line in the diff output.
53+
if ! git diff --name-only | grep -qv 'jsonnetfile.lock.json'; then
5454
git checkout -- jsonnet/jsonnetfile.lock.json;
5555
fi
5656
- name: get pr creation app token

0 commit comments

Comments
 (0)