Merge pull request #1392 from LibreTubeAlpha/master

Switch to Alpha Banners
This commit is contained in:
Bnyro 2022-09-28 16:31:46 +02:00 committed by GitHub
commit 420ddab6ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 11 deletions

2
.github/tg.py vendored
View File

@ -6,7 +6,7 @@ from os import system
from time import sleep as wait
def deploy():
system(f'./bot-api --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}')
system(f'./exec --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}')
def bot():
wait(10)

8
.github/uploader.py vendored
View File

@ -2,14 +2,8 @@ from os import system as run
import tgconfig
if tgconfig.GH_REPO.lower() == "libre-tube/libretube":
run("git clone https://github.com/LibreTubeAlpha/Archive archive")
run("rm -rf archive/*.apk")
run("mv app/build/outputs/apk/debug/*.apk archive/")
run("cd archive")
run("git add -f *")
run('git commit -m "WORKFLOW: ALPHA BUILDS"')
run("git push -u")
run("cd ..")
else:
run("mkdir archive")
run("mv app/build/outputs/apk/debug/*.apk archive/")
print("Official Repo not Detected")

View File

@ -59,15 +59,18 @@ jobs:
run: |
mv .github/uploader.py .
echo "GH_REPO = '${{ github.repository }}'" > tgconfig.py
git clone https://github.com/LibreTubeAlpha/Archive archive
rm -rf archive/*.apk
mv app/build/outputs/apk/debug/*.apk archive/
cd archive
python uploader.py
- name: Telegram Bot
continue-on-error: true
run: |
cd archive
curl https://libre-tube.github.io/images/LibreAlpha.png --output alpha.png
curl https://raw.githubusercontent.com/LibreTubeAlpha/Archive/main/exec --output bot-api
chmod 755 ./bot-api
curl https://libre-tube.github.io/images/Alpha.png --output alpha.png
chmod 755 ./exec
mv ../tgconfig.py .
echo "TG_TOKEN = '${{ secrets.TG_TOKEN }}'" >> tgconfig.py
echo "TG_API_ID = '${{ secrets.TG_API_ID }}'" >> tgconfig.py