Github Actions building R Error in read.dcf(path) cannot open the connection

When trying to run the r-lib/actions/setup-r for R in Github Actions installing the dependencies.

name: R

on:
  push:
    branches: [ main, feature/* ]
  pull_request:
    branches: [ main ]

jobs:
  build:
    runs-on: macOS-latest

    steps:
    - uses: actions/checkout@master
    - uses: r-lib/actions/setup-r@v1
    - name: Install dependencies
      run: |
        install.packages(c("remotes", "rcmdcheck", "gmodels"))
        remotes::install_deps(dependencies = TRUE)
      shell: Rscript {0}

When running this I get an error in read.dcf(path) cannot open the connection

The downloaded binary packages are in
	/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T//Rtmpq8cESb/downloaded_packages
Error: Error in read.dcf(path) : cannot open the connection
Calls: <Anonymous> ... load_pkg_description -> read_dcf -> colnames -> is.data.frame -> read.dcf
In addition: Warning message:
In read.dcf(path) :
  cannot open compressed file '/Users/runner/work/folder/R/DESCRIPTION', probable reason 'No such file or directory'
Execution halted
Error: Process completed with exit code 1.

As the error message states isn’t trying to locate a DESCRIPTION file. Add a file called DESCRIPTION in the path it’s provided (most likely your root folder). Examples of a DESCRIPTION file:

Package: mypackage
Title: What The Package Does (one line, title case required)
Version: 0.1
Authors@R: person("First", "Last", email = "first.last@example.com",
                  role = c("aut", "cre"))
Description: What the package does (one paragraph)
Depends: R (>= 3.1.0)
License: What license is it under?
LazyData: true

Source: https://r-pkgs.org/description.html