Configure an individual, specific GitHub Actions workflow, either one of the examples from r-lib/actions/examples or a custom workflow given by the url parameter.

use_github_action(
  name,
  url = NULL,
  save_as = NULL,
  ignore = TRUE,
  open = FALSE
)

use_github_action_check_release(
  save_as = "R-CMD-check.yaml",
  ignore = TRUE,
  open = FALSE
)

use_github_action_check_standard(
  save_as = "R-CMD-check.yaml",
  ignore = TRUE,
  open = FALSE
)

use_github_action_check_full(
  save_as = "R-CMD-check.yaml",
  ignore = TRUE,
  open = FALSE,
  repo_spec = NULL
)

use_github_action_pr_commands(
  save_as = "pr-commands.yaml",
  ignore = TRUE,
  open = FALSE
)

Arguments

name

Name of the workflow file, with or without a .yaml extension.

url

The full URL to the .yaml file. By default, the corresponding workflow in https://github.com/r-lib/actions will be used.

save_as

Name of the workflow file. Defaults to fs::path_file(url) for use_github_action().

ignore

Should the newly created file be added to .Rbuildignore?

open

Open the newly created file for editing? Happens in RStudio, if applicable, or via utils::file.edit() otherwise.

repo_spec

Optional GitHub repo specification in this form: owner/repo. This can usually be inferred from the GitHub remotes of active project.

use_github_action_check_release()

This workflow installs the latest release of R on macOS and runs R CMD check via the rcmdcheck package.

use_github_action_check_standard()

This workflow runs R CMD check via the rcmdcheck package on the three major operating systems (linux, macOS, and Windows) on the latest release of R and on R-devel. This workflow is appropriate for a package that is (or will hopefully be) on CRAN or Bioconductor.

use_github_action_check_full()

This workflow runs R CMD check at least once on each of the three major operating systems (linux, macOS, and Windows) and on the current release, devel, and four previous versions of R. This is how the tidyverse team checks its packages, but it may be overkill for less widely used packages. Consider using the more streamlined workflows set up by use_github_actions() or use_github_action_check_standard().

use_github_action_pr_commands()

This workflow enables the use of two R-specific commands in pull request issue comments:

See also

github_actions for generic workflows and badge generation.