Skip to contents

Produces a GitHub Actions YAML step that installs the system packages a plan needs. gha() is a short alias.

Usage

github_actions(x, platform = NULL, missing_only = TRUE, ...)

gha(x, platform = NULL, missing_only = TRUE, ...)

Arguments

x

A sysreqr_plan or package vector.

platform

Platform specification accepted by resolve_platform().

missing_only

Whether to include only packages not known to be installed.

...

Passed to check_packages() when x is not a plan.

Value

A YAML snippet.

See also

Examples

plan <- check_packages("xml2", platform = "ubuntu-22.04")
cat(github_actions(plan))
#> - name: Install Linux system dependencies
#>   run: |
#>     sudo apt-get update
#>     sudo apt-get install -y libxml2-dev
identical(gha(plan), github_actions(plan))
#> [1] TRUE