Skip to content

Commit 1e0d25e

Browse files
committed
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.
1 parent cc390be commit 1e0d25e

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,20 @@ jobs:
1919
platform: ${{ matrix.platform }}
2020
packages: git
2121
timeout-minutes: 10
22-
- name: Configure safe.directory # Workaround for actions/checkout#760
22+
23+
# Git v2.35.1 introduced safe.directory as a config option, which needs
24+
# to be set on the GitHub runners. The only git operation in this run is
25+
# in actions/checkout, and as of v2.4.1, that action can handle the new
26+
# Git config option. Unfortunately, it's broken for Cygwin: see
27+
# actions/checkout#767. In the meantime, set the configuration manually,
28+
# and use the old version of actions/checkout.
29+
- name: Configure safe.directory
2330
run: git config --global --add safe.directory '*'
2431
timeout-minutes: 1
2532
- name: Checkout
26-
uses: actions/checkout@v2
33+
uses: actions/checkout@v2.4.0
2734
timeout-minutes: 1
35+
2836
- name: Load packages to install
2937
id: cyg-package-list
3038
run: |

0 commit comments

Comments
 (0)