use_workflow | R Documentation |
Create workflow that calls an rworkflows GitHub Actions (GHA)
use_workflow(
template = "rworkflows",
name = template,
tag = "@master",
on = c("push", "pull_request"),
branches = c("master", "main", "devel", "RELEASE_**"),
runners = construct_runners(),
github_token = "${{ secrets.GITHUB_TOKEN }}",
cache_version = "cache-v1",
enable_act = FALSE,
run_bioccheck = FALSE,
run_rcmdcheck = TRUE,
as_cran = TRUE,
run_vignettes = TRUE,
has_testthat = TRUE,
has_runit = FALSE,
run_covr = TRUE,
has_latex = FALSE,
tinytex_installer = "TinyTeX-1",
tinytex_version = NULL,
pandoc_version = "2.19",
run_pkgdown = TRUE,
run_docker = FALSE,
docker_registry = "ghcr.io",
docker_user = NULL,
docker_org = docker_user,
docker_token = "${{ secrets.DOCKER_TOKEN }}",
miniforge_variant = FALSE,
miniforge_version = NULL,
activate_environment = "test",
environment_file = NULL,
channels = NULL,
save_dir = here::here(".github", "workflows"),
return_path = TRUE,
force_new = FALSE,
preview = FALSE,
verbose = TRUE
)
template |
Workflow template name.
Optionally, you can include the suffix ":<branch>" to specify which branch you would like to download the "action.yml" file from to create the static workflow template. |
name |
An arbitrary name to call the workflow. |
tag |
Which version of the |
on |
GitHub trigger conditions. |
branches |
GitHub trigger branches. |
runners |
Runner configurations for multiple Operating Systems (OS), including R versions, Bioc versions, and container sources. Can use the construct_runners functions to assist in constructing customized runners configurations. |
github_token |
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. |
cache_version |
Name of the cache sudirectory to be used when reinstalling software in GHA. |
enable_act |
Whether to add extra lines to the yaml to enable local workflow checking with act. |
run_bioccheck |
Run Bioconductor checks using
|
run_rcmdcheck |
Run R CMD checks using
|
as_cran |
When running R CMD checks, use the '–as-cran' flag to apply CRAN standards |
run_vignettes |
Build and check R package vignettes. |
has_testthat |
Run unit tests and report results. |
has_runit |
Run R Unit tests. |
run_covr |
Run code coverage tests and publish results to codecov. |
has_latex |
Install a suite of LaTeX dependencies used for rendering Sweave (.rnw) and other documentation files. |
tinytex_installer |
Which release of tinytex (bundles of LaTeX
packages) to use. All options can be found
here.
Note, 'TinyTeX-2' is only available for |
tinytex_version |
Which version of tinytex to use. When set to ”, uses the latest daily build. All versions can be found here. |
pandoc_version |
Which version of pandoc to use. For details see here. |
run_pkgdown |
Knit the README.Rmd (if available), build documentation website, and deploy to gh-pages branch. |
run_docker |
Whether to build and push a Docker container to DockerHub. |
docker_registry |
Docker container registry to push to. Options include:
|
docker_user |
Docker registry username.
Not used when |
docker_org |
Docker registry organization name.
Is the same as |
docker_token |
Docker registry token.
Not used when |
miniforge_variant |
If provided, this variant of Miniforge will be
downloaded and installed. If |
miniforge_version |
If provided, this version of the given Miniforge
variant will be downloaded and installed. If |
activate_environment |
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 |
environment_file |
Path or URL to a .yml file to build the conda environment with. For more information see here. |
channels |
Conda configuration. Comma separated list of channels to use in order of priority. See here for more information. |
save_dir |
Directory to save workflow to. |
return_path |
Return the path to the saved yaml workflow file
(default: |
force_new |
If the GHA workflow yaml already exists,
overwrite with new one (default: |
preview |
Print the yaml file to the R console. |
verbose |
Print messages. |
Path or yaml object.
Issue reading in "on:"/"y","n" elements.
Issue writing "on:" as "'as':"
path <- use_workflow(save_dir = file.path(tempdir(),".github","workflows"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.