Skip to content

Commit

Permalink
Handle actions/checkout not supporting Cygwin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
me-and committed Apr 14, 2022
1 parent cc390be commit 1e0d25e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: |
Expand Down

0 comments on commit 1e0d25e

Please sign in to comment.