From af7cf2a53bd9c3471119d39ed87c5bff3bb67315 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Wa=C5=82ejko?= Date: Fri, 9 Feb 2024 12:30:09 +0000 Subject: [PATCH] fix docker build and enable image building pipeline to avoid broken docker builds in the future --- .github/workflows/docker-publish.yml | 2 ++ Dockerfile | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml index 1490c6a..a2c680b 100644 --- a/.github/workflows/docker-publish.yml +++ b/.github/workflows/docker-publish.yml @@ -10,6 +10,8 @@ on: branches: [ "main", "devel" ] # Publish semver tags as releases. tags: [ 'v*.*.*' ] + pull_request: + branches: [main, devel] workflow_dispatch: env: diff --git a/Dockerfile b/Dockerfile index 1407623..1c8d604 100644 --- a/Dockerfile +++ b/Dockerfile @@ -22,12 +22,14 @@ ENV RENV_CONFIG_SANDBOX_ENABLED=FALSE COPY ./renv ./renv COPY .Rprofile . + +# Both renv.lock and DESCRIPTION are needed to restore the R environment COPY renv.lock . +COPY DESCRIPTION . RUN R -e 'renv::restore()' COPY .Rbuildignore . -COPY DESCRIPTION . COPY NAMESPACE . COPY inst/ ./inst COPY R/ ./R