Skip to content

Commit 28dab17

Browse files
committed
feat: add initial attempt at a template level github action to sync demos on PR updates that target develop
1 parent a42e68b commit 28dab17

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed

.github/workflows/sync-demos.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: sync-demo.yml
2+
on:
3+
pull_request:
4+
branches:
5+
- develop
6+
7+
env:
8+
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
9+
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
10+
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
11+
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
12+
13+
jobs:
14+
update-demo:
15+
name: Update Demo
16+
runs-on: ubuntu-latest
17+
18+
strategy:
19+
matrix:
20+
demo:
21+
- { name: "robust-python-demo", session_modifier: "no-rust" }
22+
- { name: "robust-maturin-demo", session_modifier: "rust" }
23+
steps:
24+
- name: Checkout Template
25+
uses: actions/checkout@v4
26+
with:
27+
repository: ${{ github.repository }}
28+
path: cookiecutter-robust-python
29+
ref: ${{ github.head_ref }}
30+
31+
- name: Checkout Demo
32+
uses: actions/checkout@v4
33+
with:
34+
repository: "${{ github.repository_owner }}/${{ matrix.demo.name }}"
35+
path: ${{ matrix.demo.name }}
36+
ref: develop
37+
38+
- name: Set up uv
39+
uses: astral-sh/setup-uv@v6
40+
41+
- name: Set up Python
42+
uses: actions/setup-python@v5
43+
with:
44+
python-version: ${{ matrix.python-version }}
45+
46+
- name: Update Demo
47+
run: "uvx nox -s 'update-demo(${{ matrix.demo.session_modifier }})'"
48+
49+

0 commit comments

Comments
 (0)