Skip to content

Commit d463d7d

Browse files
committed
fix: clone full history on GitHub Actions build job, track develop
1 parent d23b661 commit d463d7d

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

.github/workflows/build.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,7 @@ jobs:
140140
uses: actions/checkout@v4
141141
with:
142142
ref: ${{ github.event.pull_request.head.sha }}
143+
fetch-depth: 0
143144

144145
- name: Restore depends cache
145146
uses: actions/cache/restore@v4
@@ -167,7 +168,11 @@ jobs:
167168
168169
- name: Build source and run tests
169170
run: |
171+
git config --global --add advice.detachedHead false
170172
git config --global --add safe.directory "$PWD"
173+
GIT_HEAD="$(git rev-parse HEAD)"
174+
git checkout develop
175+
git checkout ${GIT_HEAD}
171176
CCACHE_SIZE="400M"
172177
CACHE_DIR="/cache"
173178
mkdir /output

0 commit comments

Comments
 (0)