forked from ame-yu/u2bili
-
Notifications
You must be signed in to change notification settings - Fork 0
/
youtube.yml
35 lines (34 loc) · 1.96 KB
/
youtube.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
on:
youtube:
channel_id:
- UCkngxfPbmGyGl_RIq4FA3MQ #西园千草
#playlist_id:
#- PL0lo9MOBetEFCNnxB1uZcDGcrPO1Jbpz8 #GitHub Changelog
config:
filterScript: |
return new Date() - 24 * 3600 * 1000 < new Date(item.pubDate) //Recent 24 hours Only
jobs:
print:
name: U2bili workflow
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup headless environment
run: |
which node
node -v
curl -fsSL https://deb.nodesource.com/setup_16.x | sudo -E bash - > apt.log # Add apt sources list and apt update
apt-get install -qqy wget ffmpeg python nodejs >> apt.log
npm i --silent
# Install Chromium dependency
apt-get install -qq 'fonts-liberation' 'libasound2' 'libatk-bridge2.0-0' 'libatk1.0-0' 'libatspi2.0-0' 'libcairo2' 'libcups2' 'libdbus-1-3' 'libdrm2' 'libgbm1' 'libgdk-pixbuf2.0-0' 'libglib2.0-0' 'libgtk-3-0' 'libnspr4' 'libnss3' 'libpango-1.0-0' 'libpangocairo-1.0-0' 'libx11-6' 'libx11-xcb1' 'libxcb-dri3-0' 'libxcb1' 'libxcomposite1' 'libxdamage1' 'libxext6' 'libxfixes3' 'libxi6' 'libxrandr2' 'libxtst6' >> apt.log
# Install FireFox dependency
apt-get install -qq 'libatk1.0-0' 'libcairo-gobject2' 'libcairo2' 'libdbus-1-3' 'libdbus-glib-1-2' 'libfontconfig1' 'libfreetype6' 'libglib2.0-0' 'libgtk-3-0' 'libgtk2.0-0' 'libharfbuzz0b' 'libpango-1.0-0' 'libpangocairo-1.0-0' 'libpangoft2-1.0-0' 'libx11-6' 'libx11-xcb1' 'libxcb-shm0' 'libxcb1' 'libxcomposite1' 'libxcursor1' 'libxdamage1' 'libxext6' 'libxfixes3' 'libxi6' 'libxrender1' 'libxt6' >> apt.log
# Install latest youtube-dl
wget -q https://yt-dl.org/latest/youtube-dl -O /usr/local/bin/youtube-dl && chmod a+x /usr/local/bin/youtube-dl
- name: u2bili
env:
link: ${{on.youtube.outputs.link}}
BILIBILI_COOKIE: ${{ secrets.BILIBILI_COOKIE }}
run: |
chmod +x ./u2bili.sh && ./u2bili.sh "${link}"