google drive access in github action using googledrive package

I am trying to access google drive using the googledrive package by Jenny Bryan.
While i can do this in Rstudio, i cant seem to figure out how to do this in a GitHub action.

The function i would expect to use can not be used in a github action for obvious reasons.

 drive_auth_configure(api_key = "YOUR_API_KEY_GOES_HERE") 

If the api_key was saved as a secret in the repo how would it get used?

Are there better alternatives to doing this? I have found 3rd party actions to do this but the repos dont seem to be currenlty developed. I was hoping the Rstudio folks would have an action to do this in their suite of other awesome actions.

Any help in understanding how to do this would be welcomed?

This is not GHA, but it is potentially very similar to what you want: GitHub - jennybc/googledrive-deployed-token-demo-service

It's not obvious, but the process is detailed here in the GitHub docs:

Essentially, you use their secrets mechanism to set an environment variable, then read that environment variable from your code.

Best,
Randy

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.