Skip to content

Commit 764bec0

Browse files
committed
[CI] one more attempt at terminating the github action earlier
1 parent 4b60972 commit 764bec0

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

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

+4-3
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,14 @@ jobs:
3636
git config user.name "cernbox-bot"
3737
cp ../grpc-proto/build/*.go .
3838
git add .
39-
git commit -m 'Synced to https://github.com/cern-eos/grpc-proto/tree/${{ github.sha }}'
40-
if [[ $? -ne 0 ]]; then
39+
done=$(git commit -m 'Synced to https://github.com/cern-eos/grpc-proto/tree/${{ github.sha }}')
40+
if [[ $done -eq 0 ]]; then
41+
git push origin main
42+
else
4143
echo "The committed changes (if any) did not update the protobufs, nothing more to do"
4244
gh run cancel ${{ github.run_id }}
4345
gh run watch ${{ github.run_id }}
4446
fi
45-
git push origin main
4647
- name: setup-buf
4748
uses: bufbuild/buf-setup-action@v1
4849
- name: push-buf

0 commit comments

Comments
 (0)