AlexsLemonade / OpenPBTA-analysis

The analysis repository for the Open Pediatric Brain Tumor Atlas Project
Other
99 stars 66 forks source link

Apply GitHub PAT via Docker secrets #1477

Closed jashapiro closed 2 years ago

jashapiro commented 2 years ago

This PR builds off the work in https://github.com/AlexsLemonade/OpenPBTA-analysis/pull/1469 in an attempt to get past github rate limiting.

The work here takes an environment variable that is provided by CircleCI project secrets containing a GitHub PAT, and applies it as a Docker secret. Docker secrets are then stored in a file in the/run/secrets directory, which it seems must be mounted by the steps that will use it. So here I am also adding a small script that reads from that file before running remotes::install_github()

Two potential followup ideas:

With the current project settings as I submit this, the GH_PAT env variable is set to a testing value, so this should fail with an authentication error at the first call to install_github.r

In local testing, this worked as expected. We will se how things go in CI!