Creates the syntax building blocks for GitHub actions: workflows and actions. For details on the syntax and arguments, see here.
make_workflow_block(IDENTIFIER, on = "push", resolves) make_action_block(IDENTIFIER, needs = NULL, uses, runs = NULL, args = NULL, env = NULL, secrets = NULL)
IDENTIFIER |
Used:
|
---|---|
on |
|
resolves |
|
needs |
|
uses |
|
runs |
|
args |
|
env |
|
secrets |
|
[character(1)]
make_workflow_block
: Write GitHub Actions syntax for one workflow block.
make_action_block
: Create GitHub Actions syntax for one action block.
make_workflow_block( IDENTIFIER = "Run calculation", on = "push", resolves = "Simple Addition" )#> workflow "Run calculation" { #> on = "push" #> resolves = [ #> "Simple Addition" #> ] #> } #># many R projects will need this block to first build an image from a DOCKERFILE make_action_block( IDENTIFIER = "Build Image", uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6", # this is an external github action, referenced tightly by sha args = "build --tag=repo:latest ." )#> action "Build Image" { #> #> uses = "actions/docker/cli@c08a5fc9e0286844156fefff2c141072048141f6" #> args = [ #> "build --tag=repo:latest ." #> ] #> } #>make_action_block( IDENTIFIER = "Simple Addition", uses = "maxheld83/ghactions/Rscript-byod@master", needs = "Build Image", args = "-e '1+1'" )#> action "Simple Addition" { #> needs = [ #> "Build Image" #> ] #> uses = "maxheld83/ghactions/Rscript-byod@master" #> args = [ #> "-e '1+1'" #> ] #> } #># pasted together, these three blocks make a simple, valid main.workflow file.