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

remove GITHUB_PAT requirement #102

Closed
5 tasks
cjyetman opened this issue Feb 9, 2024 · 7 comments
Closed
5 tasks

remove GITHUB_PAT requirement #102

cjyetman opened this issue Feb 9, 2024 · 7 comments

Comments

@cjyetman
Copy link
Member

cjyetman commented Feb 9, 2024

Currently a GITHUB_PAT environment variable is required for the Docker context in order to install RMI-PACTA/pacta.scenario.preparation and RMI-PACTA/pacta.data.preparation. If both of those packages ever become public, it would be advantageous to remove that requirement.

changes would be needed here:

GITHUB_PAT=ghp_XXXXxxXxXXXxXxxX

- `GITHUB_PAT` valid GitHub PAT that grants access to the repos:
- [RMI-PACTA/pacta.scenario.preparation](https://github.com/RMI-PACTA/pacta.scenario.preparation)
- [RMI-PACTA/pacta.data.preparation](https://github.com/RMI-PACTA/pacta.data.preparation)

AB#10386

@jdhoffa
Copy link
Member

jdhoffa commented Feb 9, 2024

@cjyetman
Copy link
Member Author

cjyetman commented Feb 9, 2024

I guess this would not be needed anymore too, because in this context it's only used to make GITHUB_PAT available for the R pkgs install. @jdhoffa do you agree?

readRenviron(".env"); \

@cjyetman cjyetman added the Docker label Feb 9, 2024
@AlexAxthelm
Copy link
Collaborator

FYI: consider using build secrets (https://docs.docker.com/build/building/secrets/), as is happening in the ACI dockerfile

# install pak, find dependencises from DESCRIPTION, and install them.
RUN --mount=type=secret,id=github_pat \
Rscript -e "\
Sys.setenv(GITHUB_PAT = readLines('/run/secrets/github_pat')); \
install.packages('pak'); \
deps <- pak::local_deps(root = '.'); \
pkg_deps <- deps[!deps[['direct']], 'ref']; \
cat(pkg_deps); \
pak::pak(pkg_deps); \
Sys.unsetenv('GITHUB_PAT'); \
"

@cjyetman
Copy link
Member Author

cjyetman commented Feb 9, 2024

also relates to RMI-PACTA/archive.pacta.data.preparation#3

@jdhoffa
Copy link
Member

jdhoffa commented Apr 10, 2024

@AlexAxthelm
Copy link
Collaborator

AlexAxthelm commented Apr 16, 2024

@cjyetman @jdhoffa I think this was closed with #217, no?

I was able to build and start the Data prep docker image without a GH PAT.

@cjyetman
Copy link
Member Author

yup, thanks.... closing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants