mirror of
https://github.com/libre-tube/LibreTube.git
synced 2025-04-28 07:50:31 +05:30
Check for Execution order
This commit is contained in:
parent
0072ac1ede
commit
cb8708d646
12
.github/checkrun.py
vendored
Normal file
12
.github/checkrun.py
vendored
Normal file
@ -0,0 +1,12 @@
|
||||
from json import load
|
||||
from os import system
|
||||
|
||||
f = open('commit.json')
|
||||
data = load(f)
|
||||
f.close()
|
||||
|
||||
message = data['commit']['message']
|
||||
|
||||
if "\n\n" in message:
|
||||
if message.split("\n\n",1)[-1].split()[0] == "[SILENT]":
|
||||
system('killall -9 python')
|
6
.github/tg.py
vendored
6
.github/tg.py
vendored
@ -2,11 +2,11 @@ import telegram
|
||||
from tgconfig import *
|
||||
from json import load
|
||||
import multiprocessing
|
||||
import os
|
||||
from os import system
|
||||
from time import sleep as wait
|
||||
|
||||
def deploy():
|
||||
os.system(f'~/bot-api --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}')
|
||||
system(f'~/bot-api --local --api-id={TG_API_ID} --api-hash={TG_API_HASH}')
|
||||
|
||||
def bot():
|
||||
wait(10)
|
||||
@ -22,7 +22,7 @@ def bot():
|
||||
Signed-off-by: {data['commit']['author']['name']}
|
||||
''', parse_mode=telegram.ParseMode.MARKDOWN)
|
||||
bot.send_media_group(TG_POST_ID, [telegram.InputMediaDocument(open('app-x86-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-x86_64-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-armeabi-v7a-debug.apk', 'rb')), telegram.InputMediaDocument(open('app-arm64-v8a-debug.apk', 'rb'))])
|
||||
os.system('killall -9 python || true')
|
||||
system('killall -9 python')
|
||||
|
||||
if __name__ == '__main__':
|
||||
multideploy = multiprocessing.Process(target=deploy)
|
||||
|
5
.github/workflows/tg-bot.yml
vendored
5
.github/workflows/tg-bot.yml
vendored
@ -26,10 +26,13 @@ jobs:
|
||||
java-version: 11
|
||||
distribution: "temurin"
|
||||
cache: "gradle"
|
||||
- name: Check for Execution Orders
|
||||
run: |
|
||||
cd .github
|
||||
python checkrun.py
|
||||
|
||||
- name: Patch and Compile
|
||||
run: |
|
||||
cd .github
|
||||
python patch.py
|
||||
cd ..
|
||||
./gradlew assembleDebug
|
||||
|
Loading…
x
Reference in New Issue
Block a user