-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.31 KB
/
check-deadlines.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
on:
workflow_dispatch:
schedule:
- cron: '42 1 * * *'
name: check-deadlines
jobs:
fetch-deadlines:
runs-on: ubuntu-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- uses: r-lib/actions/setup-renv@v2
- name: Fetch deadlines for Epiverse-TRACE packages
shell: Rscript {0}
run: |
et_cran_pkgs <- "https://epiverse-trace.r-universe.dev/api/packages/" |>
jsonlite::fromJSON() |>
dplyr::filter(
`_registered`,
`_cranurl`
) |>
dplyr::pull(Package)
crandb <- tools::CRAN_package_db()
et_pkgs_deadline <- crandb |>
dplyr::filter(
Package %in% et_cran_pkgs,
!is.na(Deadline)
)
for (i in seq_len(nrow(et_pkgs_deadline))) {
pkg <- et_pkgs_deadline$Package[i]
deadline <- et_pkgs_deadline$Deadline[i]
# Convert this step to posting a GitHub issue once confirmed working
stop(glue::glue("Package {pkg} is at risk to be archived by {deadline}."))
}