diff --git a/.github/workflows/templates.yml b/.github/workflows/templates.yml new file mode 100644 index 00000000..54d284fb --- /dev/null +++ b/.github/workflows/templates.yml @@ -0,0 +1,19 @@ +--- +name: Check Templates + +on: + workflow_dispatch: + push: + branches: + - main + - devel + - 618_templates_action + +jobs: + templates: + name: Check Templates + uses: pharmaverse/admiralci/.github/workflows/check-templates.yml@618_templates_action + secrets: inherit + #if: github.event_name == 'pull_request' + with: + r-version: "4.1" diff --git a/inst/templates/ad_adbcva.R b/inst/templates/ad_adbcva.R index 641253cc..1dfafcee 100644 --- a/inst/templates/ad_adbcva.R +++ b/inst/templates/ad_adbcva.R @@ -300,7 +300,12 @@ adbcva_crtflag <- adbcva_adsl %>% admiralophtha_adbcva <- adbcva_crtflag -# ---- Save output ---- +# Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_adbcva, file = file.path(dir, "admiralophtha_adbcva.rda"), compress = "bzip2") +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_adbcva, file = file.path(dir, "adbcva.rda"), compress = "bzip2") diff --git a/inst/templates/ad_adoe.R b/inst/templates/ad_adoe.R index 416f3332..e0aa22ad 100644 --- a/inst/templates/ad_adoe.R +++ b/inst/templates/ad_adoe.R @@ -196,7 +196,12 @@ adoe_adsl <- adoe_aseq %>% admiralophtha_adoe <- adoe_adsl -# ---- Save output ---- - -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_adoe, file = file.path(dir, "admiralophtha_adoe.rda"), compress = "bzip2") +# Save output ---- + +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_adoe, file = file.path(dir, "adoe.rda"), compress = "bzip2") diff --git a/inst/templates/ad_advfq.R b/inst/templates/ad_advfq.R index b0b4d1e0..3cc0d6a2 100644 --- a/inst/templates/ad_advfq.R +++ b/inst/templates/ad_advfq.R @@ -306,5 +306,12 @@ admiralophtha_advfq <- advfq_adsl # ---- Save output ---- -dir <- tempdir() # Change to whichever directory you want to save the dataset in -save(admiralophtha_advfq, file = file.path(dir, "admiralophtha_advfq.rda"), compress = "bzip2") +# Save output ---- + +dir <- file.path(getwd(), "tmp") +print(dir) +if (!file.exists(dir)) { + # Create the folder + dir.create(dir) +} +save(admiralophtha_advfq, file = file.path(dir, "advfq.rda"), compress = "bzip2")