-
Notifications
You must be signed in to change notification settings - Fork 0
86 lines (72 loc) · 2.42 KB
/
gen.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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
name: Generate Video
on:
workflow_dispatch:
inputs:
scriptInput:
description: 'Text script input (required)'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
# Install essential packages and imagemagick
- name: Install essential packages and ImageMagick
run: |
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y make
sudo apt-get install -y g++
sudo apt-get install -y ffmpeg
sudo apt-get install -y libmagick++-dev
sudo apt-get install -y imagemagick
# Checkout repository recursively
- name: Checkout repository
uses: actions/checkout@v2
with:
submodules: 'recursive'
# Change directory to whisper submodule and build it
- name: Build whisper submodule
run: |
cd lib/whisper
cmake -B build
cmake --build build
# Move the main binary to the root of the project
- name: Move main binary to project root
run: |
mv lib/whisper/build/bin/main .
# Run model downloader script
- name: Run model downloader script
run: |
./models/downloader.sh large-v1
# Replace policy.xml
- name: Replace policy.xml
run: |
sudo mv policy.xml /etc/ImageMagick-6/policy.xml
# Set up Python and install Python dependencies
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x' # You can specify a specific Python version here
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
python -m pip install moviepy pytube gtts
# Make the generate-with-extra-logging.sh script executable
- name: Make script executable
run: chmod +x generate-with-extra-logging.sh
# Generate the video using the provided text script
- name: Generate Video
run: |
# Accessing the input provided by the user
script="${{ github.event.inputs.scriptInput }}"
# Run the generate-with-extra-logging.sh script with the provided text as argument
./generate-with-extra-logging.sh "$script"
# Upload the generated video as an artifact
- name: Upload Video Artifact
uses: actions/upload-artifact@v2
with:
name: generated_files
path: |
final_video_with_audio.mp4
generate-image.png