-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathaction.yml
596 lines (558 loc) Β· 23.7 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
name: 'rworkflows'
description: >
rworkflows: Full workflow to test, document, and deploy R packages.
author: 'Brian M. Schilder'
branding:
icon: check-square
color: green
inputs:
run_bioccheck:
description: >
Run Bioconductor checks. Must pass in order to continue workflow.
default: true
run_rcmdcheck:
description: >
Run R CMD checks. Must pass in order to continue workflow.
default: true
as_cran:
description: >
When running R CMD checks, use the '--as-cran' flag to apply CRAN standards.
run_vignettes:
description: >
Build and check R package vignettes.
default: true
run_covr:
description: >
Run code coverage tests and publish results to Codecov.
default: true
run_pkgdown:
description: >
Knit the README.Rmd (if available), build documentation website,
and deploy to gh-pages branch.
default: true
has_testthat:
description: >
Run unit tests with the `testthat` package and report the results.
Requires a subdirectory named 'tests'.
default: true
has_runit:
description: >
Run unit tests with the `RUnit` package.
Requires a subdirectory named 'unitTests'.
default: false
has_latex:
description: >
Install a suite of LaTeX dependencies used for rendering Sweave (.rnw)
and other documentation files.
default: false
tinytex_installer:
description: >
Which release of tinytex (bundles of LaTeX packages) to use.
All options can be found here: https://github.com/rstudio/tinytex-releases/
Note, 'TinyTeX-2' is only available for 'tinytex_version: daily'.
default: 'TinyTeX-1'
tinytex_version:
description: >
Which version of tinytext to use.
When set to '', uses the latest daily build.
All versions can be found here: https://github.com/rstudio/tinytex-releases/releases
default: ''
pandoc_version:
description: >
Which version of pandoc to use.
For details see here: https://github.com/r-lib/actions/tree/v2-branch/setup-pandoc
default: '2.19'
run_docker:
description: >
Whether to build and push a Docker container to DockerHub.
default: false
docker_registry:
description: >
Docker container registry to push to.
Options include:
- ghcr.io : GitHub Container Registry (https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)
- docker.io : DockerHub (https://hub.docker.com/)
default: 'ghcr.io'
docker_user:
description: >
Docker registry username.
Not used when `docker_registry="ghcr.io"`.
docker_org:
description: >
Docker registry organization name. Can be the same as `docker_user`.
Not used when `docker_registry="ghcr.io"`.
DOCKER_TOKEN:
description: >
Docker registry authentication token.
Not used when `docker_registry="ghcr.io"`.
GITHUB_TOKEN:
description: >
GitHub authentication token with permissions to push
to the R package's GitHub repository.
Also used to bypass GitHub download limits.
By default, uses {{ secrets.GITHUB_TOKEN }}
which is automatically set up by GitHub.
However users can also choose to pass a custom GitHub secret variable
(e.g. {{ secrets.PAT_GITHUB }}) which allows access to private
repositories. Read here for more details:
https://docs.github.com/en/actions/security-guides/automatic-token-authentication.
CODECOV_TOKEN:
description: >
Codecov repository token needed to upload coverage reports.
Providing this token helps prevent report upload failures by bypassing
Codecov's GitHub API rate limits. Read here for more details:
https://docs.codecov.com/docs/adding-the-codecov-token
cache_version:
description: >
Which cache version to use.
Change this when trying to avoid using previous caches.
default: cache-v1
runner_os:
description: >
The Operating System (OS) that the workflow is running on.
default: 'Linux'
timeout:
description: >
The maximum time to wait for long R processes like
dependency installations, downloads, and code checks.
default: 2000
miniforge_variant:
description: >
If provided, this variant of Miniforge will be downloaded and installed.
If `miniforge_variant=false`, Miniforge will not be installed at all.
If `miniforge_variant=""`, the "Miniforge3" variant will be installed.
If `miniforge_version` is not provided, the `latest` version will be used.
Currently-known values: - "Miniforge3" (default) - "Miniforge-pypy3" -
"Mambaforge" - "Mambaforge-pypy3".
Visit https://github.com/conda-forge/miniforge/releases/ for more
information on available variants.
default: false
miniforge_version:
description: >
If provided, this version of the given Miniforge variant will be
downloaded and installed. If `miniforge_variant` is not provided,
`Miniforge3` will be used. Visit
https://github.com/conda-forge/miniforge/releases/ for more information on
available versions.
default: 'latest'
activate_environment:
description: >
Environment name (or path) to activate on all shells. Default is `test`
which will be created in `$CONDA/envs/test`. If an empty string is used,
no environment is activated by default (For `base` activation see the
`auto-activate-base` option). If the environment does not exist, it will
be created and activated. If `environment-file` is used and you want that
to be the environment used, you need to explicitely provide the name of
that environment on `activate-environment`. If using sh/bash/cmd.exe
shells please read the IMPORTANT! section on the README.md! to properly
activate conda environments on these shells.
default: "test"
environment_file:
description: >
Path or URL to a .yml file to build the conda environment with.
For more information see:
https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file
default: ''
channels:
description: >
Conda configuration. Comma separated list of channels to use in order of
priority. See
https://docs.conda.io/projects/conda/en/latest/user-guide/configuration/
for more information.
default: ''
free_diskspace:
description: >
Free up additional disk space by deleting non-essential sofwares.
default: false
run_telemetry:
description: >
Whether to run the workflow telemetry action:
https://github.com/catchpoint/workflow-telemetry-action
default: true
force_install:
description: >
Whether to force install packages. If `true`, all packages will be
reinstalled, bypassing the cache.
Recommended to set to `true` when pushing changes without updating R
package version, such as during pre-release phase of developement.
default: false
runs:
using: 'composite'
steps:
- name: π Collect Workflow Telemetry
if: inputs.run_telemetry == 'true'
uses: runforesight/workflow-telemetry-action@v1
continue-on-error: true
with:
github_token: ${{ inputs.GITHUB_TOKEN }}
comment_on_pr: false
- name: πΎ Free Disk Space
if: inputs.free_diskspace == 'true' && runner.os == 'Linux'
uses: jlumbroso/free-disk-space@main
- name: π Set environment variables
run: |
echo "RGL_USE_NULL=TRUE" >> $GITHUB_ENV
echo "R_REMOTES_NO_ERRORS_FROM_WARNINGS=${{ true }}" >> $GITHUB_ENV
echo "RSPM=${{ matrix.config.rspm }}" >> $GITHUB_ENV
echo "TZ=UTC" >> $GITHUB_ENV
echo "NOT_CRAN=${{ !inputs.as_cran }}" >> $GITHUB_ENV
shell: bash {0}
- name: π Setup Miniconda
if: inputs.miniforge_variant != 'false'
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: false
python-version: ${{ matrix.python-version }}
miniforge-variant: ${{ inputs.miniforge_variant }}
miniforge-version: ${{ inputs.miniforge_version }}
activate-environment: ${{ inputs.activate_environment }}
environment-file: ${{ inputs.environment_file }}
channels: ${{ inputs.channels }}
## Set the R library to the directory matching the
## R packages cache step further below when running on Docker (Linux).
- name: π Set R library home on Linux
if: runner.os == 'Linux'
run: |
mkdir -p /__w/_temp/Library
echo ".libPaths('/__w/_temp/Library')" >> ~/.Rprofile
git config --global --add safe.directory '*'
shell: bash {0}
## Most of these steps are the same as the ones in
## https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml
## If they update their steps, we will also need to update ours.
- name: β¬ Checkout repository
uses: actions/checkout@v4
## R/Bioc are already installed on the Bioc Docker container,
## and reinstalling them causes errors.
- name: π Setup R and Bioconductor
if: runner.os != 'Linux'
uses: grimbough/bioc-actions/setup-bioc@v1
with:
bioc-version: ${{ matrix.config.bioc }}
## pandoc is already included in the Bioconductor docker images
- name: π Install Pandoc
if: inputs.pandoc_version != 'false' && runner.os != 'Linux'
uses: r-lib/actions/setup-pandoc@v2
with:
pandoc-version: ${{ inputs.pandoc_version }}
- name: β Query dependencies
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE)
install.packages('remotes')
remotes::install_github("r-lib/remotes")
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
- name: π¦ Restore R package cache
if: |
!contains(github.event.head_commit.message, '[nocache]') && runner.os != 'Linux'
uses: actions/cache@v3
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ inputs.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ inputs.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-
- name: π¦ Cache R packages on Linux
if: |
!contains(github.event.head_commit.message, '[nocache]') && runner.os == 'Linux'
uses: actions/cache@v3
with:
path: /home/runner/work/_temp/Library
key: ${{ inputs.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ inputs.cache_version }}-${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-
- name: π Install Linux system dependencies
if: runner.os == 'Linux'
run: |
sysreqs=$(Rscript -e 'cat("apt-get update -y && apt-get install -y", paste(gsub("apt-get install -y ", "", remotes::system_requirements("ubuntu", "20.04")), collapse = " "))')
echo $sysreqs
sudo -s eval "$sysreqs"
sudo apt-get install -y qpdf rsync
shell: bash {0}
- name: π Install macOS system dependencies
if: runner.os == 'macOS'
run: |
#### --- Justifications for each package --- ####
### libxml2 ###
# Enable installing XML from source if needed
### imagemagick@6 ###
# Required to install magick as noted at
# https://github.com/r-lib/usethis/commit/f1f1e0d10c1ebc75fd4c18fa7e2de4551fd9978f#diff-9bfee71065492f63457918efcd912cf2
### harfbuzz fribidi ###
# For textshaping, required by ragg, and required by pkgdown
### libgit2 ###
# For installing usethis's dependency gert
### xquartz --cask ###
# Required for tcltk
### libxfont ###
# Required for some ggplot2 functions
### texlive ###
# Required for rendering Sweave files (even with r-lib/actions/setup-tinytex)
#### --- Install packages --- ####
### Install normally ###
brew install libxml2 imagemagick@6 harfbuzz fribidi libgit2 texlive
### Install via cask ###
brew install xquartz --cask
### Set up xml2 ###
echo "XML_CONFIG=/usr/local/opt/libxml2/bin/xml2-config" >> $GITHUB_ENV
shell: bash {0}
- name: π Install Windows system dependencies
if: inputs.has_latex == 'true' && runner.os == 'Windows'
run: |
#### npm ####
npm install curl
shell: pwsh {0}
- name: π Install latex
if: inputs.has_latex == 'true'
uses: r-lib/actions/setup-tinytex@v2
env:
TINYTEX_INSTALLER: ${{ inputs.tinytex_installer }}
TINYTEX_VERSION: ${{ inputs.tinytex_version }}
- name: π Install latex packages
if: inputs.has_latex == 'true'
env:
tinytex_installer: ${{ inputs.tinytex_installer }}
tinytex_version: ${{ inputs.tinytex_version }}
run: |
install.packages("tinytex")
extra_packages <- c("bera","nowidow","parnotes","marginfix","etoolbox",
"titlesec","sectsty","framed","enumitem","parskip","soul","placeins",
"footmisc","changepage","xstring","caption","mathtools","fancyhdr",
"preprint","ragged2e","pdfcrop","titling","silence","everysel")
tinytex::tlmgr_install(pkgs = extra_packages)
shell: Rscript {0}
- name: π Install dependencies pass 1
env:
timeout: ${{ inputs.timeout }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
force_install: ${{ inputs.force_install }}
run: |
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
## For running the checks
message(paste('****', Sys.time(), 'installing rcmdcheck ****'))
install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE)
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****'))
repos <- BiocManager::repositories()
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=Sys.getenv("force_install"))
continue-on-error: true
shell: Rscript {0}
- name: π Install dependencies pass 2
env:
timeout: ${{ inputs.timeout }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies****'))
repos <- BiocManager::repositories()
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE)
shell: Rscript {0}
- name: π Install RUnit (via BiocGenerics)
if: inputs.has_runit == 'true'
run: |
options(crayon.enabled = TRUE)
BiocManager::install("BiocGenerics")
shell: Rscript {0}
- name: π Install covr
if: inputs.run_covr == 'true' && runner.os == 'Linux'
run: |
options(crayon.enabled = TRUE)
install.packages("covr")
shell: Rscript {0}
- name: π Install pkgdown
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
run: |
options(crayon.enabled = TRUE)
install.packages("pkgdown")
shell: Rscript {0}
- name: π Install gh cli and jq
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
run: |
sudo apt-get install -y gh jq
shell: bash {0}
- name: π Update quarto to latest release
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
uses: quarto-dev/quarto-actions/setup@v2
with:
version: release
- name: βΉοΈ Session info οΈ
run: |
options(width = 100, crayon.enabled = TRUE)
pkgs <- installed.packages()[,"Package"]
if(!require("sessioninfo", quietly=TRUE)) install.packages("sessioninfo")
tryCatch({
sessioninfo::session_info(pkgs, include_base = TRUE)
}, error = function(x){utils::sessionInfo()})
shell: Rscript {0}
- name: β
Run CMD check
if: inputs.run_rcmdcheck == 'true'
env:
_R_CHECK_CRAN_INCOMING_: false
RGL_USE_NULL: ${{ env.RGL_USE_NULL }}
DISPLAY: 99.0
AS_CRAN: ${{ inputs.as_cran }}
run_vignettes: ${{ inputs.run_vignettes }}
timeout: ${{ inputs.timeout }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
if(!require("rcmdcheck", quietly=TRUE)) install.packages("rcmdcheck")
as_cran <- if(Sys.getenv("AS_CRAN")=='true') "--as-cran" else NULL
run_build_vignettes <- if(Sys.getenv("run_vignettes")=='true') NULL else "--no-build-vignettes"
run_vignettes <- if(Sys.getenv("run_vignettes")=='true') NULL else "--ignore-vignettes"
rcmdcheck::rcmdcheck(
args = c("--no-manual", "--timings", as_cran, run_vignettes),
build_args = c("--no-manual", "--keep-empty-dirs", "--no-resave-data", run_build_vignettes),
error_on = "warning",
check_dir = "check")
shell: Rscript {0}
- name: π Reveal testthat details
if: inputs.has_testthat == 'true'
run: |
find . -name testthat.Rout -exec cat '{}' ';'
shell: bash {0}
- name: π Run RUnit tests (via BiocGenerics)
if: inputs.has_runit == 'true'
env:
timeout: ${{ inputs.timeout }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
BiocGenerics:::testPackage()
shell: Rscript {0}
- name: β
Run BiocCheck
if: inputs.run_bioccheck == 'true'
env:
DISPLAY: 99.0
RGL_USE_NULL: ${{ env.RGL_USE_NULL }}
run_vignettes: ${{ inputs.run_vignettes }}
as_cran: ${{ inputs.as_cran }}
timeout: ${{ inputs.timeout }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
#### Install deps ####
if(!require("BiocManager", quietly=TRUE)) install.packages("BiocManager")
if(!require("BiocCheck", quietly=TRUE)) BiocManager::install("BiocCheck")
#### Allow for packages on CRAN ####
no_check_vignettes <- Sys.getenv("run_vignettes")=='true'
as_cran <- Sys.getenv("as_cran")=='true'
#### Run checks ####
BiocCheck::BiocCheck(
dir('check', 'tar.gz$', full.names = TRUE),
`quit-with-status` = TRUE,
`no-check-R-ver` = TRUE,
`no-check-vignettes` = no_check_vignettes,
`no-check-CRAN` = as_cran,
`no-check-bioc-help` = as_cran)
shell: Rscript {0}
- name: π Test coverage
if: inputs.run_covr == 'true' && runner.os == 'Linux'
env:
CODECOV_TOKEN: ${{ inputs.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
## NOTE: codecov() uses CODECOV_TOKEN env var if specified.
## (recommended)
covr::codecov()
shell: Rscript {0}
- name: π Install package οΈ
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: R CMD INSTALL .
shell: bash {0}
- name: βΉοΈ Get R package info
if: runner.os == 'Linux'
env:
dockerRegistry: ${{ inputs.docker_registry }}
dockerOrg: ${{ inputs.docker_org }}
dockerUser: ${{ inputs.docker_user }}
DOCKER_TOKEN: ${{ inputs.DOCKER_TOKEN }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
#### Docker repos must be lowercase (,,) ####
## NOTE: Bash cannot intrepret variables with "." in them when trying to
## string manipulation (e.g. making lowercase with ",,").
## So use "GITHUB_REPOSITORY_OWNER" instead of "github.repository_owner",
## or store the variable as an intermediate variable without "." in it.
## Also be sure to exclude any surrounding spaces inside the "{}" when using ",,".
packageNameOrig=$(grep '^Package:' DESCRIPTION | cut -d\ -f2)
echo "packageName=${packageNameOrig,,}" >> $GITHUB_ENV
echo "packageNameOrig=${packageNameOrig}" >> $GITHUB_ENV
version=$(grep Version DESCRIPTION | grep -o "[0-9.]\+")
echo "packageVersion=${version}" >> $GITHUB_ENV
echo "BASE_IMAGE=${{ matrix.config.cont }}" >> $GITHUB_ENV
#### Adjust docker args depending on docker_registry ####
if [[ $dockerRegistry == "docker.io" ]]; then
echo "dockerOrg=${dockerOrg,,}" >> $GITHUB_ENV
echo "dockerUser=${dockerUser}" >> $GITHUB_ENV
echo "dockerPass=${DOCKER_TOKEN}" >> $GITHUB_ENV;
else
echo "dockerOrg=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
echo "dockerUser=${GITHUB_ACTOR}" >> $GITHUB_ENV
echo "dockerPass=${GITHUB_TOKEN}" >> $GITHUB_ENV;
fi
shell: bash {0}
- name: π¦ Render README
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
env:
DISPLAY: 99.0
run: |
if(file.exists("README.Rmd")){
options(crayon.enabled = TRUE)
if(!require("rmarkdown", quietly=TRUE)) install.packages("rmarkdown");
rmarkdown::render("README.Rmd", output_format = rmarkdown::github_document(html_preview = FALSE));
}
shell: Rscript {0}
- name: π¦ Build pkgdown site
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE)
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
shell: Rscript {0}
- name: π¦π Deploy pkgdown site to GitHub pages
if: inputs.run_pkgdown == 'true' && runner.os == 'Linux'
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
clean: false
branch: gh-pages
folder: docs
token: ${{ inputs.GITHUB_TOKEN }}
- name: β« Upload check results
if: failure()
uses: actions/upload-artifact@v3
with:
name: ${{ runner.os }}-biocversion-${{ matrix.config.bioc }}-r-${{ matrix.config.r }}-results
path: check
## DockerHub steps
- name: π³βοΈ Create Docker file
if: |
(!contains(github.event.head_commit.message, '[nodocker]')) && inputs.run_docker == 'true' && runner.os == 'Linux'
env:
BASE_IMAGE: ${{ matrix.config.cont }}
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
run: |
options(crayon.enabled = TRUE)
if(!require("rworkflows", quietly=TRUE)) remotes::install_github("neurogenomics/rworkflows")
path <- rworkflows::use_dockerfile(base_image=Sys.getenv("BASE_IMAGE"))
shell: Rscript {0}
- name: π³π Build and Push to Docker Registry
if: |
(!contains(github.event.head_commit.message, '[nodocker]')) && inputs.run_docker == 'true' && runner.os == 'Linux'
uses: docker/build-push-action@v1
env:
GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }}
with:
username: ${{ env.dockerUser }}
password: ${{ env.dockerPass }}
registry: ${{ inputs.docker_registry }}
repository: ${{ env.dockerOrg }}/${{ env.packageName }}
tag_with_ref: true
tag_with_sha: false
tags: |
${{ env.packageVersion }},
latest
build_args: |
PKG=${{ env.packageNameOrig }},
BASE_IMAGE=${{ matrix.config.cont }}