Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update packages in build-check-install workflow + run staged.dependencies conditionally #222

Merged
merged 10 commits into from
Apr 9, 2024
23 changes: 22 additions & 1 deletion .github/workflows/build-check-install.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,18 @@ on:
required: false
type: string
default: ""
enable-sd:
description: |
Whether the installation of package dependencies via staged.dependencies should be enabled.
required: false
type: boolean
default: true
update-r-packages:
description: |
Whether R packages installed in the image should be updated to their latest version from CRAN/BioC.
walkowif marked this conversation as resolved.
Show resolved Hide resolved
required: false
type: boolean
default: false

concurrency:
group: r-cmd-${{ inputs.concurrency-group }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -338,8 +350,17 @@ jobs:
key: sd-${{ runner.os }}-${{ github.event.repository.name }}
path: ~/.staged.dependencies

- name: Update R packages 🗓️
if: >-
inputs.update-r-packages == true
walkowif marked this conversation as resolved.
Show resolved Hide resolved
run: |
update.packages()
walkowif marked this conversation as resolved.
Show resolved Hide resolved
shell: Rscript {0}

- name: Run Staged dependencies 🎦
if: inputs.install-deps-from-package-repositories == ''
if: >-
inputs.enable-sd == true
&& inputs.install-deps-from-package-repositories == ''
uses: insightsengineering/staged-dependencies-action@v1
env:
GITHUB_PAT: ${{ steps.github-token.outputs.token }}
Expand Down
Loading