Learn R Programming

usethis (version 1.6.1)

use_github_action: Use a specific GitHub action

Description

Use a specific action, either one of the example actions from r-lib/actions/examples or a custom action given by the url parameter.

Usage

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 )

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

Arguments

name

Name of the GitHub action, with or without .yaml extension

url

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

save_as

Name of the actions file. Defaults to basename(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.

<code>use_github_action_check_release()</code>

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

<code>use_github_action_check_standard()</code>

This action runs R CMD check via the rcmdcheck package on the three major OSs (linux, macOS and Windows) on the release version of R and R-devel. This action is most appropriate when you plan to eventually submit your package to CRAN or Bioconductor.

<code>use_github_action_check_full()</code>

This action installs the last 5 minor R versions and runs R CMD check via the rcmdcheck package on the three major OSs (linux, macOS and Windows). This action is what the tidyverse teams uses on their repositories, but is overkill for less widely used packages, which are better off using the simpler use_github_action_check_release().

<code>use_github_action_pr_commands()</code>

This workflow enables the use of 2 R specific commands in pull request issue comments. /document will use roxygen2 to rebuild the documentation for the package and commit the result to the pull request. /style will use styler to restyle your package.

See Also

github_actions for generic workflows.