-
-
Notifications
You must be signed in to change notification settings - Fork 275
51 lines (51 loc) · 1.47 KB
/
render-video.yml
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
on:
workflow_dispatch:
inputs:
repoOrg:
description: "Repo Org"
required: true
default: "pomber"
repoName:
description: "Repo Name"
required: true
default: "didact"
starCount:
description: "Star Count"
required: true
default: "100"
duration:
description: "Duration (seconds)"
required: false
default: "15"
name: Render video
jobs:
render:
name: Render video
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@main
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Fallback fonts (fonts)
run: |
sudo apt-get update -yqq
sudo apt-get install -yq --no-install-recommends \
fonts-noto-core fonts-noto-cjk fonts-noto-color-emoji fonts-noto-mono
- name: Install dependencies (node modules)
run: npm i
- name: Define input props
run: echo $WORKFLOW_INPUT | tee input-props.json | jq -C '.' # Inject to file, inspect to logs
env:
WORKFLOW_INPUT: ${{ toJson(github.event.inputs) }}
- name: Render video
run: npm run build -- --props="./input-props.json"
env:
REMOTION_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload video
uses: actions/upload-artifact@v3
with:
name: out.mp4
path: out/Main.mp4