-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Setup matrix workflow to spread runners (#2)
* Setup matrix workflow to spread runners * does name help? * id was wrong * update deps * remove name * incorrect name * try cat * output is no json * write in json
- Loading branch information
Showing
4 changed files
with
101 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
season <- Sys.getenv("NFLVERSE_UPDATE_SEASON", unset = NA_character_) |> as.integer() | ||
type <- Sys.getenv("NFLVERSE_UPDATE_TYPE", unset = NA_character_) | ||
type <- rlang::arg_match0(type, c("passing", "rushing", "receiving", "combine")) | ||
|
||
source("R/ngs_functions.R") | ||
|
||
if(Sys.getenv("NFLVERSE_REBUILD", "false") == "true"){ | ||
seasons_to_update <- seq(2016, nflreadr::most_recent_season()) | ||
if (type == "combine"){ | ||
purrr::walk(c("passing", "rushing", "receiving"), combine_ngs_data) | ||
} else { | ||
seasons_to_update <- nflreadr::most_recent_season() | ||
save_ngs_data(season, type) | ||
} | ||
save_ngs_data(seasons_to_update) | ||
|
||
purrr::walk(c("passing", "rushing", "receiving"), combine_ngs_data) |