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

Github Actions Can't Install Dev Version #394

Closed
OlexiyPukhov opened this issue Feb 3, 2024 · 4 comments
Closed

Github Actions Can't Install Dev Version #394

OlexiyPukhov opened this issue Feb 3, 2024 · 4 comments

Comments

@OlexiyPukhov
Copy link

How would I use this in github actions? Trying to get the package two different ways, but they both fail with github actions. I can run it locally with no issue using install_dev().
I'm getting an error with > remotes::install_github("tidyverse/rvest")
Error: Error: Failed to install 'rvest' from GitHub: and an error with remotes::install_dev("rvest")
Error: Error: Failed to install 'unknown package' from GitHub:

image
The url in the picture says:
cannot open URL 'https://api.github.com/repos/tidyverse/rvest/contents/DESCRIPTION?ref=HEAD'
image

Don't think the Github PAT is the issue here.

The relevant github actions code:

  - name: Install R packages
    run: |
      R -e 'install.packages("remotes", repos = "http://cran.rstudio.com")'
      R -e 'remotes::install_github("tidyverse/rvest")' 
@hadley
Copy link
Member

hadley commented Feb 5, 2024

I suspect the failure is happening because the bundled PAT is getting rate limited. I haven't seen this sort of problem for a while, which I suspect is because I'm relying on https://github.com/r-lib/actions/tree/v2-branch/setup-r-dependencies and generally usethis::use_github_action(), which does a bunch of work to setup your action in a way that's most likely to succeed.

@OlexiyPukhov
Copy link
Author

OlexiyPukhov commented Feb 5, 2024

I tried putting my PAT in, but it just gave me the same error:

Error: Error: Failed to install 'rvest' from GitHub:
can't convert package rvest with RemoteType 'any' to remote
Execution halted

The new github actions code that I used:

  - name: Install R packages
    env:
      GITHUB_PAT: ${{ secrets.MY_GITHUB_PAT }}
    run: |
      R -e 'install.packages("remotes", repos = "http://cran.rstudio.com")'
      R -e 'Sys.setenv(GITHUB_PAT = Sys.getenv("GITHUB_PAT"))'
      R -e 'remotes::install_github("tidyverse/rvest")'

@hadley
Copy link
Member

hadley commented Feb 12, 2024

Can you try using pak instead? That's what we now use for all our github actions.

@OlexiyPukhov
Copy link
Author

Okay, I'm using pak and also downloading the most stable version with read html live. It downloads, but I get another error. Making a new issue.

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

2 participants