From 1e0d25e9034b8de2fe87b53628667cba731c4bb6 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Thu, 14 Apr 2022 21:44:59 +0100 Subject: [PATCH] Handle actions/checkout not supporting Cygwin Per actions/checkout#767, the latest version of actions/checkout overrides any existing global Git configuration, and instead uses its own global configuration with safe.directory configured. Unfortunately, it configures a Windows path for safe.directory, which Cygwin Git doesn't handle. As a (hopefully) temporary workaround, pin that action to the known-working version, and continue to set safe.directory manually. --- .github/workflows/ci.yml | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 609fbc8..9384fbc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -19,12 +19,20 @@ jobs: platform: ${{ matrix.platform }} packages: git timeout-minutes: 10 - - name: Configure safe.directory # Workaround for actions/checkout#760 + + # Git v2.35.1 introduced safe.directory as a config option, which needs + # to be set on the GitHub runners. The only git operation in this run is + # in actions/checkout, and as of v2.4.1, that action can handle the new + # Git config option. Unfortunately, it's broken for Cygwin: see + # actions/checkout#767. In the meantime, set the configuration manually, + # and use the old version of actions/checkout. + - name: Configure safe.directory run: git config --global --add safe.directory '*' timeout-minutes: 1 - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v2.4.0 timeout-minutes: 1 + - name: Load packages to install id: cyg-package-list run: |