-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into cansavvy/jekyll
- Loading branch information
Showing
9 changed files
with
117 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# Candace Savonen May 2022 | ||
# Candace Savonen March 2024 | ||
|
||
name: Pull Request | ||
|
||
|
@@ -47,19 +47,27 @@ jobs: | |
with: | ||
files: ottr_python/* | ||
|
||
- name: Get specific changed files | ||
id: quarto | ||
uses: tj-actions/[email protected] | ||
with: | ||
files: ottr_quarto/* | ||
|
||
- run: | | ||
echo ${{steps.base_ottr.outputs.any_changed}} | ||
echo ${{steps.ottrpal.outputs.any_changed}} | ||
echo ${{steps.bioconductor.outputs.any_changed}} | ||
echo ${{steps.jekyll.outputs.any_changed}} | ||
echo ${{steps.python.outputs.any_changed}} | ||
echo ${{steps.quarto.outputs.any_changed}} | ||
outputs: | ||
base_ottr_changed: ${{steps.base_ottr.outputs.any_changed}} | ||
ottrpal_changed: ${{steps.ottrpal.outputs.any_changed}} | ||
bioconductor_changed: ${{steps.bioconductor.outputs.any_changed}} | ||
jekyll_changed: ${{steps.jekyll.outputs.any_changed}} | ||
python_changed: ${{steps.python.outputs.any_changed}} | ||
quarto_changed: ${{steps.quarto.outputs.any_changed}} | ||
|
||
build-base: | ||
name: Build base ottr image | ||
|
@@ -115,3 +123,14 @@ jobs: | |
tag: jhudsl/ottr_python | ||
secrets: | ||
GH_PAT: ${{ secrets.GH_PAT }} | ||
|
||
build-quarto: | ||
name: Build quarto ottr image | ||
needs: dockerfiles-changed | ||
if: ${{needs.dockerfiles-changed.outputs.quarto_changed == 'true'}} | ||
uses: ./.github/workflows/docker-test.yml | ||
with: | ||
directory: ottr_quarto | ||
tag: jhudsl/ottr_quarto | ||
secrets: | ||
GH_PAT: ${{ secrets.GH_PAT }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ spell_check_results.tsv | |
.RData | ||
.httr-oauth | ||
docker/git_token.txt | ||
git_token.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
FROM jhudsl/base_ottr:main | ||
LABEL maintainer="[email protected]" | ||
|
||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
pandoc \ | ||
pandoc-citeproc \ | ||
curl \ | ||
gdebi-core \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
RUN curl -LO https://quarto.org/download/latest/quarto-linux-amd64.deb | ||
RUN gdebi --non-interactive quarto-linux-amd64.deb | ||
|
||
# Set final workdir for commands | ||
WORKDIR /home/rstudio |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
rstudio/rmarkdown 02d3c2512686fda9c14c2a0e300aa02525f16ca5 | ||
yihui/xfun 74c2a6605d8f0fb19314da542baeead6dc8697d9 | ||
yihui/knitr a1052d12e0ff8f4ead365b4c85ef5835faa1c492 | ||
jhudsl/ottrpal HEAD | ||
tidyverse/rvest 4fe39fb5089512d77b6a9cc026e5c895258ff6ce | ||
R-lib/testthat e99155af85261e065192feb946dcfa6679cffae4 | ||
rstudio/bookdown 88bc4ead8562ea281838041c795b38fc4a6a7165 | ||
jhudsl/cow HEAD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
if (!"optparse" %in% installed.packages()) { | ||
install.packages("optparse") | ||
} | ||
|
||
library(optparse) | ||
|
||
################################ Set up options ################################ | ||
# Set up optparse options | ||
option_list <- list( | ||
make_option( | ||
opt_str = c("-p", "--packages"), type = "character", | ||
default = "github_package_list.tsv" , | ||
help = "Path to a TSV with a list of packages to be installed through Github, | ||
where file where the first column is the github package name e.g. | ||
jhudsl/ottrpal and the second column is the commit ID to be installed | ||
(to be supplied to the ref argument). | ||
", | ||
metavar = "character" | ||
), | ||
make_option( | ||
opt_str = c("--token"), type = "character", | ||
default = NULL, | ||
help = "GITHUB PAT file", | ||
metavar = "character" | ||
) | ||
) | ||
|
||
# Parse options | ||
opt <- parse_args(OptionParser(option_list = option_list)) | ||
|
||
# Read in the token | ||
token <- as.character(readLines(opt$token)[1]) | ||
|
||
# Reset GITHUB PAT to be token | ||
Sys.unsetenv("GITHUB_PAT") | ||
Sys.setenv(GITHUB_PAT = token) | ||
|
||
# set up list of packages to install | ||
packages <- readr::read_tsv(opt$packages, | ||
col_names = c("package_name", "ref")) | ||
|
||
purrr::pmap( | ||
packages, | ||
~remotes::install_github(..1, | ||
auth_token = token, | ||
ref = ..2) | ||
) | ||
|
||
# Remove the file after we are done | ||
file.remove(opt$token) |