Skip to content

Commit 2d6b6c4

Browse files
committed
[CI] detect and skip rest of action when nothing to commit
1 parent a059582 commit 2d6b6c4

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build-and-publish.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,11 @@ jobs:
3838
git add .
3939
git commit -m 'Synced to https://github.com/cern-eos/grpc-proto/tree/${{ github.sha }}'
4040
git push origin main
41+
if [[ $? -ne 0 ]]; then
42+
echo "The committed changes (if any) did not update the protobufs, nothing more to do"
43+
gh run cancel ${{ github.run_id }}
44+
gh run watch ${{ github.run_id }}
45+
fi
4146
- name: setup-buf
4247
uses: bufbuild/buf-setup-action@v1
4348
- name: push-buf

0 commit comments

Comments
 (0)