Skip to content

Commit 3a77647

Browse files
nanotaboadaclaude
andcommitted
ci(cd): use git merge-base --is-ancestor for ancestry check (#292)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 02dc7cc commit 3a77647

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.github/workflows/maven-cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Verify tag commit is reachable from master
4747
run: |
48-
if ! git branch -r --contains "${{ github.sha }}" | grep -q "origin/master"; then
48+
if ! git merge-base --is-ancestor "${{ github.sha }}" origin/master; then
4949
echo "❌ Tag commit ${{ github.sha }} is not reachable from origin/master"
5050
exit 1
5151
fi

0 commit comments

Comments
 (0)