Просмотр исходного кода

fix(ci): fetch full history in details-check so base ref diff works (#4940)

The create-matrix job runs 'git diff origin/${base_ref}...HEAD' to
detect which servers a PR touches, but actions/checkout defaults to a
shallow single-branch fetch, so origin/develop does not exist in the
runner and the diff fails with 'ambiguous argument' on every PR that
reaches this job. Set fetch-depth: 0 so the base ref is available.
Daniel Gibbs 2 дней назад
Родитель
Сommit
d402330737
1 измененных файлов с 5 добавлено и 0 удалено
  1. 5 0
      .github/workflows/details-check.yml

+ 5 - 0
.github/workflows/details-check.yml

@@ -27,6 +27,11 @@ jobs:
     steps:
       - name: Checkout
         uses: actions/checkout@v6
+        with:
+          # Full history so the base branch ref is available for the
+          # `git diff origin/<base>...HEAD` comparison below (a shallow
+          # checkout has no origin/<base> and the diff fails).
+          fetch-depth: 0
 
       - name: Detect targeted servers (PR only)
         id: targeted