diff options
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/testsuite.yml | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/.github/workflows/testsuite.yml b/.github/workflows/testsuite.yml index 96c858d151..2d6e6ff2f6 100644 --- a/.github/workflows/testsuite.yml +++ b/.github/workflows/testsuite.yml @@ -469,13 +469,12 @@ jobs: git config --global core.autocrlf false mkdir -p ~ cd ~ - git clone -qn "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" work + git init work cd work - if [ "$GITHUB_EVENT_NAME" = pull_request ]; then - git fetch origin "$GITHUB_REF" && git checkout FETCH_HEAD - else - git checkout "$GITHUB_SHA" - fi + git remote add origin "https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY" + git config --local gc.auto 0 + git fetch origin --depth=1 "$GITHUB_SHA" + git checkout "$GITHUB_SHA" - name: Configure shell: sh env: |