| use_github_action_pkgcheck | R Documentation |
Creates a Github workflow file in dir integrate pkgcheck() into your CI.
use_github_action_pkgcheck(
dir = ".github/workflows",
overwrite = FALSE,
file_name = "pkgcheck.yaml",
branch = gert::git_branch(),
inputs = NULL
)
dir |
Directory the file is written to. |
overwrite |
Overwrite existing file? |
file_name |
Name of the workflow file. |
branch |
Name of git branch for checks to run; defaults to currently active branch. |
inputs |
Named list of inputs to the
|
For more information on the action and advanced usage visit the action repository.
The path to the new file, invisibly.
Inputs with description and default values. Pass all values as strings, see examples.
inputs:
ref:
description: "The ref to checkout and check. Set to empty string to skip checkout."
default: "${{ github.ref }}"
required: true
post-to-issue:
description: "Should the pkgcheck results be posted as an issue?"
# If you use the 'pull_request' trigger and the PR is from outside the repo
# (e.g. a fork), the job will fail due to permission issues
# if this is set to 'true'. The default will prevent this.
default: ${{ github.event_name != 'pull_request' }}
required: true
issue-title:
description: "Name for the issue containing the pkgcheck results. Will be created or updated."
# This will create a new issue for every branch, set it to something fixed
# to only create one issue that is updated via edits.
default: "pkgcheck results - ${{ github.ref_name }}"
required: true
summary-only:
description: "Only post the check summary to issue. Set to false to get the full results in the issue."
default: true
required: true
append-to-issue:
description: "Should issue results be appended to existing issue, or posted in new issues."
default: true
required: true
Other github:
get_default_github_branch(),
get_latest_commit()
# These functions will by default create new files in the default `.dir`.
## Not run:
f <- use_github_action_pkgcheck (inputs = list (`post-to-issue` = "false"))
readLines (f)
f <- use_github_action_pkgcheck (branch = "main")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.