Skip to content

Commit b37651f

Browse files
committed
chore(ci): commit only if there are changes to lib/
1 parent 11727c8 commit b37651f

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

.github/workflows/packagist.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -60,13 +60,17 @@ jobs:
6060
merge-multiple: true
6161

6262
- run: |
63-
git config user.name "${GITHUB_ACTOR}"
64-
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
63+
if ! git diff --quiet -- lib/; then
64+
git config user.name "${GITHUB_ACTOR}"
65+
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
6566
66-
git add lib/
67-
git commit -m "ci: update shared libraries [skip ci]"
68-
git show
69-
git push
67+
git add lib/
68+
git commit -m "ci: update shared libraries [skip ci]"
69+
git show
70+
git push
71+
else
72+
echo "No changes in lib/"
73+
fi
7074
7175
- name: Update Packagist
7276
run: |

0 commit comments

Comments
 (0)