Skip to content

Commit

Permalink
Merge pull request #28 from jhudsl/cansavvy-patch-1
Browse files Browse the repository at this point in the history
Eliminate need for creds
  • Loading branch information
cansavvy authored Jul 16, 2024
2 parents 0336b47 + a0c4714 commit d007d3b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 93 deletions.
27 changes: 6 additions & 21 deletions .github/workflows/docker-test.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# Candace Savonen Apr 2022

name: Build Docker Image
Expand All @@ -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
Expand All @@ -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
Expand Down
22 changes: 11 additions & 11 deletions base_ottr/Dockerfile
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
Expand Down Expand Up @@ -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
9 changes: 0 additions & 9 deletions base_ottr/github_package_list.tsv

This file was deleted.

52 changes: 0 additions & 52 deletions base_ottr/install_github.R

This file was deleted.

0 comments on commit d007d3b

Please sign in to comment.