Running R scripts on github actions with secret api keys

Viewed 216

I'm using a package to download data from a web api. Normally when I run this workflow I use environment variables to store the API credentials on my local machine.

library(scrobbler)

df <- download_scrobbles(Sys.getenv(LASTFM_API_USERNAME), Sys.getenv(LASTFM_API_KEY))

write.csv(df, "df.csv")

I'd like to set up this script to run on github actions. How can I setup this script to run on Actions in a way that I dont have to hardcode my API key into the script?

0 Answers
Related