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