Skip to content

Commit e39855d

Browse files
Update target and GitHub Action to run and upload all demos daily (operator-framework#2020)
1 parent 302d2df commit e39855d

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

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

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,22 @@
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+
- 'api/*'
10+
- 'config/*'
11+
- 'hack/demo/*'
12+
- '.github/workflows/update-demos.yaml'
13+
pull_request:
14+
paths:
15+
- 'api/*'
16+
- 'config/*'
17+
- 'hack/demo/*'
18+
- '.github/workflows/update-demos.yaml'
19+
1120
jobs:
1221
demo:
1322
runs-on: ubuntu-latest
@@ -26,5 +35,5 @@ jobs:
2635
PATH="$PATH" \
2736
TERM="xterm-256color" \
2837
SHELL="/bin/bash" \
29-
make demo-update
38+
make update-demos
3039

Makefile

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

450450
# The demo script requires to install asciinema with: brew install asciinema to run on mac os envs.
451-
.PHONY: demo-update #EXHELP build demo
452-
demo-update:
453-
./hack/demo/generate-asciidemo.sh -u -n catalogd-demo catalogd-demo-script.sh
451+
# Please ensure that all demos are named with the demo name and the suffix -demo-script.sh
452+
.PHONY: update-demos #EXHELP Update and upload the demos.
453+
update-demos:
454+
@for script in hack/demo/*-demo-script.sh; do \
455+
nm=$$(basename $$script -script.sh); \
456+
./hack/demo/generate-asciidemo.sh -u -n $$nm $$(basename $$script); \
457+
done
454458

455459
include Makefile.venv

0 commit comments

Comments
 (0)