-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Added tar_nix_ga(), a function to run targets pipelines on Github A…
…ctions using a Nix expression
- Loading branch information
Bruno Rodrigues
committed
Oct 21, 2023
1 parent
6705024
commit b709fce
Showing
6 changed files
with
50 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# WARNING - Generated by {fusen} from dev/cicd.Rmd: do not edit by hand | ||
|
||
#' tar_nix_ga Run a {targets} pipeline on Github Actions. | ||
#' @details This function puts a `.yaml` file inside the `.github/workflows/` | ||
#' folders on the root of your project. This workflow file will use the | ||
#' projects `default.nix` file to generate the development environment on | ||
#' Github Actions and will then run the projects {targets} pipeline. Make | ||
#' sure to give read and write permissions to the Github Actions bot. | ||
#' @return Nothing, copies file to a diretory. | ||
#' | ||
#' @noRd | ||
tar_nix_ga <- function(){ | ||
# Add an empty .gitignore file if there isn’t any | ||
|
||
if(file.exists(".gitignore")){ | ||
NULL | ||
} else { | ||
file.create(".gitignore") | ||
} | ||
|
||
path <- ".github/workflows" | ||
|
||
dir.create(path, recursive = TRUE) | ||
source <- system.file( | ||
file.path("extdata", "run-pipeline.yaml"), | ||
package = "rix", | ||
mustWork = TRUE | ||
) | ||
file.copy(source, path, overwrite = TRUE) | ||
invisible() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters