Job not merge when loading dependencies from container


I having a cron job on Github Actions that load dependencies and install them using external sources and then execute code for refreshing data and push it back to the repository (workflow file). I am now trying to load all the required dependencies from a docker container using the following code:

name: Data Refresh

    - cron:  '0 */4 * * *'
    name: coronavirus dataset refresh
    runs-on: ubuntu-18.04 
     image: rkrispin/coronavirus:dev
      - name: checkout_repo
        uses: actions/checkout@v2
          repository: ${{ github.repository }}
          ref: 'dev'
          token: ${{ github.token }}
          clean: 'true'
          fetch-depth: '1'
      - name: Refresh the data
        run: Rscript ./data_raw/data_refresh.R
      - name: Push the updates
        if: success()
        run: |
              if [[ "$(git status --porcelain)" != "" ]]; then
                  git config --global 'RamiKrispin'
                  git config --global ''
                  git commit -am 'coronavirus dataset autoup date [dev]'

For some reasons, when trying to push the changes back to the repository I am getting the following error:

  shell: sh -e {0}
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

I think that the git is not automatically set when running this method either because using ubuntu (as opposed to Mac on the previous method) or since loading the dependencies from a docker container.

Any suggestions?

Issue solved, the git version on the Docker image was older than the required (v 2.18)