Skip to content

Commit f10f3a0

Browse files
Update target and GitHub Action to run and upload all demos daily
- Renamed Makefile target and GitHub Action to 'update-demos' for clarity - Iterates over all *-demo-script.sh files and uploads casts - Replaced CI trigger with a daily scheduled cron job at 03:00 UTC - Retained workflow_dispatch for manual triggering - Rename scripts to have sufix to allow works
1 parent 752d7d5 commit f10f3a0

File tree

6 files changed

+19
-10
lines changed

6 files changed

+19
-10
lines changed

.github/workflows/catalogd-demo.yaml renamed to .github/workflows/update-demos.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
name: catalogd-demo
1+
name: update-demos
22

33
on:
4+
schedule:
5+
- cron: '0 3 * * *' # Runs every day at 03:00 UTC
46
workflow_dispatch:
5-
merge_group:
6-
pull_request:
77
push:
8-
branches:
9-
- main
10-
8+
paths:
9+
- 'hack/demo/*'
10+
- '.github/workflows/update-demos.yaml'
11+
pull_request:
12+
paths:
13+
- 'hack/demo/*'
14+
- '.github/workflows/update-demos.yaml'
15+
1116
jobs:
1217
demo:
1318
runs-on: ubuntu-latest
@@ -26,5 +31,5 @@ jobs:
2631
PATH="$PATH" \
2732
TERM="xterm-256color" \
2833
SHELL="/bin/bash" \
29-
make demo-update
34+
make update-demos
3035

Makefile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,8 +424,12 @@ deploy-docs: venv
424424
mkdocs gh-deploy --force
425425

426426
# The demo script requires to install asciinema with: brew install asciinema to run on mac os envs.
427-
.PHONY: demo-update #EXHELP build demo
428-
demo-update:
429-
./hack/demo/generate-asciidemo.sh -u -n catalogd-demo catalogd-demo-script.sh
427+
.PHONY: update-demos #EXHELP Update and upload the demos.
428+
update-demos:
429+
@for script in hack/demo/*-demo-script.sh; do \
430+
nm=$$(basename $$script -script.sh); \
431+
echo "Running and uploading demo: $$nm from $$script"; \
432+
./hack/demo/generate-asciidemo.sh -u -n $$name $$(basename $$script); \
433+
done
430434

431435
include Makefile.venv

0 commit comments

Comments
 (0)