-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (41 loc) · 1.38 KB
/
demo.yml
File metadata and controls
47 lines (41 loc) · 1.38 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
name: Generate Demo
on:
workflow_dispatch:
inputs:
commit:
description: 'Commit the generated demo files'
required: false
default: 'true'
type: boolean
jobs:
generate-demo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install VHS
run: |
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://repo.charm.sh/apt/gpg.key | sudo gpg --dearmor -o /etc/apt/keyrings/charm.gpg
echo "deb [signed-by=/etc/apt/keyrings/charm.gpg] https://repo.charm.sh/apt/ * *" | sudo tee /etc/apt/sources.list.d/charm.list
sudo apt update && sudo apt install -y vhs ffmpeg
- name: Generate Demo
run: |
cd demo
ln -sf demo-testingbot testingbot
vhs demo.tape
rm testingbot
ls -la
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: demo-files
path: demo/demo.gif
- name: Commit demo files
if: ${{ inputs.commit == true || inputs.commit == 'true' }}
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add demo/demo.gif
git diff --staged --quiet || git commit -m "chore: regenerate demo"
git push