-
Notifications
You must be signed in to change notification settings - Fork 5
58 lines (51 loc) · 1.82 KB
/
update-demo.yml
File metadata and controls
58 lines (51 loc) · 1.82 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: update-demo.yml
on:
workflow_call:
inputs:
demo_name:
required: true
type: string
branch:
required: true
type: string
secrets:
DEMO_TOKEN:
required: true
env:
COOKIECUTTER_ROBUST_PYTHON__DEMOS_CACHE_FOLDER: ${{ github.workspace }}
COOKIECUTTER_ROBUST_PYTHON__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_PYTHON_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
ROBUST_MATURIN_DEMO__APP_AUTHOR: ${{ github.repository_owner }}
GH_TOKEN: ${{ secrets.DEMO_TOKEN }}
jobs:
update-demo:
runs-on: ubuntu-latest
steps:
- name: Checkout Template
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ github.repository }}
path: "${{ github.workspace }}/cookiecutter-robust-python"
- name: Configure Git
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Checkout Demo
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: "${{ github.repository_owner }}/${{ inputs.demo_name }}"
path: ${{ inputs.demo_name }}
ref: develop
token: ${{ secrets.DEMO_TOKEN }}
- name: Set up uv
uses: astral-sh/setup-uv@v6
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version-file: "${{ github.workspace }}/cookiecutter-robust-python/.github/workflows/.python-version"
- name: Update Demo
working-directory: "${{ github.workspace }}/cookiecutter-robust-python"
run: "uvx nox -s 'update-demo(${{ inputs.demo_name }})' -- --branch-override ${{ inputs.branch }}"