Skip to content

Commit 1304ad3

Browse files
committed
fix: fetch the whole generator and hold the schedule until a run is green
1 parent 704a466 commit 1304ad3

1 file changed

Lines changed: 15 additions & 8 deletions

File tree

‎.github/workflows/banner.yml‎

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
name: banner
22

33
# Regenerates docs/assets/banner*.svg from repo-kit.toml and patches the
4-
# dwgx-banner block in README.md. The generator is fetched from dwgx/DWGX at
5-
# run time, so this repository keeps no copy of it and upgrades come from there.
4+
# dwgx-banner block in README.md. The generator is fetched from dwgx/DWGX at run
5+
# time, so this repository keeps no copy of it and upgrades come from there.
6+
#
7+
# The schedule stays off until a manual run has been watched go green: a failing
8+
# schedule means one email per repository, and a broken generator fails loudly.
69
on:
7-
schedule:
8-
- cron: "23 */6 * * *"
910
workflow_dispatch:
1011
push:
1112
paths:
@@ -30,11 +31,17 @@ jobs:
3031

3132
- name: fetch generator
3233
run: |
34+
set -euo pipefail
3335
mkdir -p /tmp/repokit
34-
curl -fsSL -o /tmp/repokit/build.py \
35-
https://raw.githubusercontent.com/dwgx/DWGX/main/repo-kit/build.py
36-
curl -fsSL -o /tmp/repokit/styles.py \
37-
https://raw.githubusercontent.com/dwgx/DWGX/main/repo-kit/styles.py
36+
base=https://raw.githubusercontent.com/dwgx/DWGX/main/repo-kit
37+
for f in build.py styles.py styles_ink.py ink.py; do
38+
curl -fsSL -o "/tmp/repokit/$f" "$base/$f"
39+
done
40+
# fail here, not three steps later, if a file is missing
41+
test -s /tmp/repokit/build.py
42+
test -s /tmp/repokit/styles_ink.py
43+
test -s /tmp/repokit/ink.py
44+
python -c "import sys; sys.path.insert(0,'/tmp/repokit'); import build; print('generator ok, theme', build.THEME)"
3845
3946
- name: render
4047
env:

0 commit comments

Comments
 (0)