From d463d7d3973595149fb1b0cdab226a6d9d7138f6 Mon Sep 17 00:00:00 2001 From: Kittywhiskers Van Gogh <63189531+kwvg@users.noreply.github.com> Date: Sun, 24 Nov 2024 12:18:21 +0000 Subject: [PATCH] fix: clone full history on GitHub Actions build job, track `develop` --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7b9dbd8020..75d319b09f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -140,6 +140,7 @@ jobs: uses: actions/checkout@v4 with: ref: ${{ github.event.pull_request.head.sha }} + fetch-depth: 0 - name: Restore depends cache uses: actions/cache/restore@v4 @@ -167,7 +168,11 @@ jobs: - name: Build source and run tests run: | + git config --global --add advice.detachedHead false git config --global --add safe.directory "$PWD" + GIT_HEAD="$(git rev-parse HEAD)" + git checkout develop + git checkout ${GIT_HEAD} CCACHE_SIZE="400M" CACHE_DIR="/cache" mkdir /output