diff options
author | Bram <perl-rt@wizbit.be> | 2022-09-11 22:18:57 +0200 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2022-09-13 18:52:00 -0600 |
commit | a62862a6bb77ef3d3d6645fd9026e4dacc1888e6 (patch) | |
tree | 0a28b0b8c3ea34c8f766564baa8e405a499fe332 /.github | |
parent | 7737a385f10bd54496ada6b89793d1bbe6d0b559 (diff) | |
download | perl-a62862a6bb77ef3d3d6645fd9026e4dacc1888e6.tar.gz |
CI/cygwin: clone the repo similar to 'checkout@v2'
The primary reason for doing is to make it similar to all the
other CI configs.
The second reason for doing this is because it makes the checkout
faster. (old: 1m14s, new: 9s)
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: |