actions / checkout

Action for checking out a repo
https://github.com/features/actions
MIT License
5.94k stars 1.77k forks source link

action doesn't use git repo with git > 2.18 installed #1936

Open acnicholls opened 1 month ago

acnicholls commented 1 month ago

I can't seem to get my runner to create or use a repository

Here's my action calling code

      - name: Check out the code with a filter
        id: download-compose-files
        uses: actions/checkout@v4
        with:
          ref: develop
          sparse-checkout: |
            docker-compose.ghcr-stage.yml
          sparse-checkout-cone-mode: true

and here's the result from the workflow log:


Getting Git version info
  Working directory is '<redacted>'
  /usr/bin/git version
  git version 2.25.1
Deleting the contents of '<redacted>'
The repository will be downloaded using the GitHub REST API
To create a local Git repository instead, add Git 2.18 or higher to the PATH
Downloading the archive

this is a self-hosted running ubuntu 20.04 and non-root user with the action runner running as a service. what am I missing?