Commit b470adf
committed
scrape: skip cleanly in CI when DATABASE_URL secret is absent
The repo doesn't have DATABASE_URL configured yet, so the daily
scheduled scrape has been failing red for the last three days even
though the scraper code is fine — the workflow just has no way to
authenticate to a database that doesn't exist.
Two changes:
- scripts/scrape-all.mjs: in CI without DATABASE_URL, exit 0 with a
workflow ::notice instead of failing. Local runs and any run with
SCRAPE_REQUIRE_DB=true still fail loudly, so dev work isn't
silenced.
- workflow: a 'check secrets' step gates every downstream step on
whether DATABASE_URL is set. When unset the run renders one notice
in the summary and exits green; when set it runs exactly the way
it used to.
Signed-off-by: Charlie Tonneslan <cst0520@gmail.com>1 parent da2719e commit b470adf
2 files changed
Lines changed: 52 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
16 | 27 | | |
| 28 | + | |
17 | 29 | | |
18 | 30 | | |
19 | 31 | | |
20 | | - | |
| 32 | + | |
| 33 | + | |
21 | 34 | | |
| 35 | + | |
22 | 36 | | |
23 | 37 | | |
| 38 | + | |
24 | 39 | | |
25 | 40 | | |
| 41 | + | |
26 | 42 | | |
27 | 43 | | |
28 | 44 | | |
| |||
31 | 47 | | |
32 | 48 | | |
33 | 49 | | |
| 50 | + | |
34 | 51 | | |
35 | 52 | | |
36 | 53 | | |
37 | 54 | | |
38 | 55 | | |
39 | 56 | | |
| 57 | + | |
40 | 58 | | |
41 | 59 | | |
42 | 60 | | |
| |||
50 | 68 | | |
51 | 69 | | |
52 | 70 | | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
53 | 82 | | |
| 83 | + | |
54 | 84 | | |
55 | | - | |
| 85 | + | |
| 86 | + | |
56 | 87 | | |
| 88 | + | |
57 | 89 | | |
58 | 90 | | |
59 | 91 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
4 | 9 | | |
5 | 10 | | |
6 | 11 | | |
| |||
9 | 14 | | |
10 | 15 | | |
11 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
12 | 30 | | |
13 | 31 | | |
14 | 32 | | |
| |||
0 commit comments