Skip to content

Commit 2779419

Browse files
committed
chore: Abort if nothing to ship
1 parent 990e05a commit 2779419

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

.github/workflows/ship-it.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,17 @@ jobs:
2121
git checkout master
2222
2323
- name: Log commits to be shipped
24-
run: git log --oneline master..next
24+
id: commits-to-ship
25+
run: |
26+
git log --oneline master..next
27+
echo "count=$(git log --oneline master..next | wc -l)" >> $GITHUB_OUTPUT
2528
2629
- name: Fast-forward master to next
30+
if: steps.commits-to-ship.outputs.count != '0'
2731
run: git merge --ff-only next
2832

2933
- name: Push updated master to origin
34+
if: steps.commits-to-ship.outputs.count != '0'
3035
run: |
3136
git push origin master
3237
env:

0 commit comments

Comments
 (0)