Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input 'submodules' not supported when falling back to download using the GitHub REST API with standard setup #758

Open
kbegiedza opened this issue Apr 12, 2022 · 9 comments

Comments

@kbegiedza
Copy link

I'm using standard hosted runner with standard actions/checkout@v3, but action is unable to checkout & pull my public repo submodule.
When I executed my pipeline I got:
Error: Input 'submodules' not supported when falling back to download using the GitHub REST API. To create a local Git repository instead, add Git 2.18 or higher to the PATH.

It's pretty weird that I'm using ubuntu-latest (20.04) and don't have Git >= 2.18 in PATH.

my pipeline:

jobs:
  build-and-test:
    runs-on: ubuntu-latest
    container: ghcr.io/kbegiedza/cuda:11.6.0-sdk

    steps:
    - uses: actions/checkout@v3
      with:
        submodule: recursive

    - name: Configure CMake
      run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

    - name: Build
      run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}

    - name: Test
      working-directory: ${{github.workspace}}/build
      run: ctest -C ${{env.BUILD_TYPE}}
@kbegiedza
Copy link
Author

I can see that ubuntu-latest (now 20.04) have installed proper version of git:

https://github.com/actions/virtual-environments/blob/main/images/linux/Ubuntu2004-Readme.md#tools

@kbegiedza
Copy link
Author

Added below step as workaround:

    - name: Checkout submodules
      run: |
        git submodule update --init --recursive

@nafg
Copy link

nafg commented Jun 26, 2022

I'm getting this error on windows-latest -- https://github.com/slick/slick/actions/runs/2563233013

Williangalvani added a commit to Williangalvani/blueos-docker that referenced this issue Nov 17, 2022
Williangalvani added a commit to Williangalvani/blueos-docker that referenced this issue Nov 17, 2022
patrickelectric pushed a commit to bluerobotics/BlueOS that referenced this issue Nov 18, 2022
dskprt added a commit to origami-system/kernel that referenced this issue Dec 1, 2022
@RunningLeon
Copy link

same issue met in ubuntu18.04 and ubuntu 20.04

@andersonjwan
Copy link

andersonjwan commented Dec 24, 2022

Same issue here! This is my step that fails:

- name: Checkout
  uses: actions/checkout@v3
  with:
     submodules: true

Williangalvani added a commit to Williangalvani/blueos-docker that referenced this issue Jan 12, 2023
@joshuaVayer
Copy link

In my case, the mistake was caused because I was using the PATH environment variable. The issue was resolved by simply renaming my variable. Hope this help.

Errored :

env: 
  PATH: "root/directory"

Working :

env: 
  ANOTHER_PATH: "root/directory"

@andersonjwan
Copy link

andersonjwan commented Feb 10, 2023

Same issue here! This is my step that fails:

- name: Checkout
  uses: actions/checkout@v3
  with:
     submodules: true

I've appeared to have indirectly fixed the issue. For those that are using a separate container/image for the job run, you must ensure your image has Git v2.18+ installed; otherwise, you will receive the issues I've faced.

Here is a complete example:

jobs:
  example:
    name: Example Job
    runs-on: ubuntu-latest
    container: <image with Git v2.18+ installed>
    steps:
      - name: Checkout
        uses: actions/checkout@v3
        with:
          submodules: true

@zccrs
Copy link

zccrs commented Apr 12, 2023

You need to install the "git > 2.18" in the "ghcr.io/kbegiedza/cuda:11.6.0-sdk" container before actions/checkout@v3

@bowenzhang23
Copy link

bowenzhang23 commented Jun 17, 2023

I just faced the same issue recently.

Thanks to the suggestions of the latest posts, I have solved it as follows.

runs-on: ubuntu-latest
container:
  image: <your_image>

steps:
- name: Install git on container
  run: |
    apt update
    apt install -y git

- uses: actions/checkout@v3
  with:
    submodules: true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants