-
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 pull request #28 from jhudsl/cansavvy-patch-1
Eliminate need for creds
- Loading branch information
Showing
4 changed files
with
17 additions
and
93 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,3 @@ | ||
|
||
# Candace Savonen Apr 2022 | ||
|
||
name: Build Docker Image | ||
|
@@ -25,31 +24,20 @@ on: | |
DOCKERHUB_TOKEN: | ||
required: false | ||
|
||
defaults: | ||
run: | ||
working-directory: ./ | ||
|
||
jobs: | ||
|
||
build-docker: | ||
name: Build Docker image | ||
runs-on: ubuntu-latest | ||
|
||
|
||
steps: | ||
- name: checkout repo | ||
uses: actions/checkout@v3 | ||
|
||
- name: Verify Dockerfiles changed? | ||
uses: tj-actions/[email protected] | ||
id: verify-changed-files | ||
with: | ||
files: | | ||
${{ inputs.directory }}/Dockerfile | ||
${{ inputs.directory }}/github_package_list.tsv | ||
- name: Login as jhudsl-robot | ||
run: | | ||
git config --local --add safe.directory "$GITHUB_WORKSPACE" | ||
git config --local user.email "[email protected]" | ||
git config --local user.name "jhudsl-robot" | ||
# Set up Docker build | ||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
@@ -63,16 +51,13 @@ jobs: | |
restore-keys: | | ||
${{ runner.os }}-buildx- | ||
- name: Set up Docker Build | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Build Docker image | ||
- name: Build | ||
uses: docker/build-push-action@v4 | ||
with: | ||
push: false | ||
load: true | ||
context: ${{ inputs.directory }} | ||
file: ${{ inputs.directory }}/Dockerfile | ||
platforms: linux/amd64 | ||
tags: ${{ inputs.tag }} | ||
|
||
# Login to Dockerhub | ||
|
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,8 +1,8 @@ | ||
# syntax=docker/dockerfile:1 | ||
FROM rocker/tidyverse:4.3.2 | ||
LABEL maintainer="[email protected]" | ||
WORKDIR /rocker-build/ | ||
|
||
COPY install_github.R . | ||
WORKDIR /rocker-build/ | ||
|
||
# Install apt-getable packages to start | ||
RUN apt-get update && apt-get install -y --no-install-recommends apt-utils dialog | ||
|
@@ -72,25 +72,25 @@ RUN Rscript -e "options(warn = 2);install.packages( \ | |
'config', \ | ||
'quarto', \ | ||
'chromote', \ | ||
'rvest', \ | ||
'DT', \ | ||
'knitr', \ | ||
'xfun', \ | ||
'testthat', \ | ||
'webshot2'), \ | ||
repos = 'https://cloud.r-project.org/')" | ||
|
||
# cow needs this dependency: | ||
RUN Rscript -e "devtools::install_version('gitcreds', version = '0.1.1', repos = 'http://cran.us.r-project.org')" | ||
|
||
# Copy over git token and package list | ||
COPY git_token.txt . | ||
COPY github_package_list.tsv . | ||
|
||
# Install packages from github | ||
RUN Rscript install_github.R \ | ||
--packages github_package_list.tsv \ | ||
--token git_token.txt | ||
RUN installGithub.r \ | ||
jhudsl/ottrpal \ | ||
jhudsl/cow | ||
|
||
# Set final workdir for commands | ||
WORKDIR /home/rstudio | ||
|
||
RUN wget https://downloads.vivaldi.com/stable/vivaldi-stable_5.5.2805.35-1_amd64.deb | ||
RUN wget https://downloads.vivaldi.com/stable/vivaldi-stable_5.5.2805.35-1_amd64.deb | ||
RUN apt-get update && apt-get install -y ./vivaldi-stable_5.5.2805.35-1_amd64.deb && rm -rf /var/lib/apt/lists/* | ||
|
||
RUN echo CHROMOTE_CHROME=/usr/bin/vivaldi >> .Renviron |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.