ci: accelerate the checkout

By upgrading from v1 to v2 of `actions/checkout`, we avoid fetching all the tags and the complete history: v2 only fetches one revision by default. This should make things a lot faster. Note that `actions/checkout@v2` seems to be incompatible with running in containers: https://github.com/actions/checkout/issues/151. Therefore, we stick with v1 there. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Johannes Schindelin committed Jul 4, 2021 at 22:55 UTC 0dc787a9f23f78902b8792e44ff8187398e49de8
1 file changed +5 -5
.github/workflows/main.yml
+5 -5
@@ -81,7 +81,7 @@ jobs:
81 if: needs.ci-config.outputs.enabled == 'yes'
82 runs-on: windows-latest
83 steps:
84 - - uses: actions/checkout@v1
84 + - uses: actions/checkout@v2
85 - uses: git-for-windows/setup-git-for-windows-sdk@v1
86 - name: build
87 shell: bash
@@ -134,7 +134,7 @@ jobs:
134 GIT_CONFIG_PARAMETERS: "'user.name=CI' 'user.email=ci@git'"
135 runs-on: windows-latest
136 steps:
137 - - uses: actions/checkout@v1
137 + - uses: actions/checkout@v2
138 - uses: git-for-windows/setup-git-for-windows-sdk@v1
139 - name: initialize vcpkg
140 uses: actions/checkout@v2
@@ -237,7 +237,7 @@ jobs:
237 jobname: ${{matrix.vector.jobname}}
238 runs-on: ${{matrix.vector.pool}}
239 steps:
240 - - uses: actions/checkout@v1
240 + - uses: actions/checkout@v2
241 - run: ci/install-dependencies.sh
242 - run: ci/run-build-and-tests.sh
243 - run: ci/print-test-failures.sh
@@ -282,7 +282,7 @@ jobs:
282 jobname: StaticAnalysis
283 runs-on: ubuntu-18.04
284 steps:
285 - - uses: actions/checkout@v1
285 + - uses: actions/checkout@v2
286 - run: ci/install-dependencies.sh
287 - run: ci/run-static-analysis.sh
288 documentation:
@@ -292,6 +292,6 @@ jobs:
292 jobname: Documentation
293 runs-on: ubuntu-latest
294 steps:
295 - - uses: actions/checkout@v1
295 + - uses: actions/checkout@v2
296 - run: ci/install-dependencies.sh
297 - run: ci/test-documentation.sh