title: Error installing miniconda on GitHub Actions in an R project
body: <p>I am trying to build and deploy <a href="https://github.com/ropensci-books/drake" rel="nofollow noreferrer">this <code>bookdown</code> project</a> with GitHub Actions. One of the chapters uses the <code>keras</code> R package, which means I need to install Conda (or set up a virtual environment). At the end of the <a href="https://github.com/ropensci-books/drake/blob/02aae82ba8ef98a03b1adcb82db4d4839de88322/.github/workflows/render.yaml#L51" rel="nofollow noreferrer">Miniconda installation command</a>, there is an error when trying to collect metadata.</p>
  <pre><code>2020-06-24T04:47:59.7495480Z * Miniconda has been successfully installed at '/Users/runner/Library/r-miniconda'.
  2020-06-24T04:47:59.7496060Z [1] &quot;/Users/runner/Library/r-miniconda&quot;
  2020-06-24T04:48:00.3909040Z * Project '~/runners/2.263.0/work/drake/drake' loaded. [renv 0.10.0]
  2020-06-24T04:48:00.7964920Z * The project and lockfile are out of sync -- use `renv::status()` for more details.
  2020-06-24T04:48:00.7968340Z Warning message:
  2020-06-24T04:48:00.7969190Z Project requested R version '3.6.0' but '4.0.1' is currently being used 
  2020-06-24T04:48:05.2408080Z Collecting package metadata (current_repodata.json): ...working... failed
  2020-06-24T04:48:05.2410390Z 
  2020-06-24T04:48:05.2410820Z NotWritableError: The current user does not have write permissions to a required path.
  2020-06-24T04:48:05.2411080Z   path: /usr/local/miniconda/pkgs/cache/b89cf7bf.json
  2020-06-24T04:48:05.2411230Z   uid: 501
  2020-06-24T04:48:05.2411350Z   gid: 20
  2020-06-24T04:48:05.2411430Z 
  2020-06-24T04:48:05.2411690Z If you feel that permissions on this path are set incorrectly, you can manually
  2020-06-24T04:48:05.2411940Z change them by executing
  2020-06-24T04:48:05.2412010Z 
  2020-06-24T04:48:05.2412260Z   $ sudo chown 501:20 /usr/local/miniconda/pkgs/cache/b89cf7bf.json
  2020-06-24T04:48:05.2412330Z 
  2020-06-24T04:48:05.2413470Z In general, it's not advisable to use 'sudo conda'.
  2020-06-24T04:48:05.2413570Z 
  2020-06-24T04:48:05.2414250Z 
  2020-06-24T04:48:05.2886400Z ##[error]Error: Error 1 occurred creating conda environment r-reticulate
  2020-06-24T04:48:05.2890770Z Execution halted
  2020-06-24T04:48:05.3050700Z ##[error]Process completed with exit code 1.
  </code></pre>
  <p>The full job log is <a href="https://github.com/ropensci-books/drake/runs/802058075?check_suite_focus=true" rel="nofollow noreferrer">here</a>.</p>