ci: Fixed build information

This commit is contained in:
ShirkNeko
2025-11-15 12:47:11 +08:00
parent 3cfc6d6a31
commit 83209a5259
7 changed files with 6 additions and 55 deletions

View File

@@ -88,14 +88,6 @@ jobs:
echo "$BOOT_SIGN_KEY" > ./kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem
fi
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Build boot images
run: |
export AVBTOOL=$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin/avbtool

View File

@@ -123,14 +123,6 @@ jobs:
echo "$BOOT_SIGN_KEY" > ./kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem
fi
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Build boot images
run: |
export AVBTOOL=$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin/avbtool

View File

@@ -135,14 +135,6 @@ jobs:
echo "$BOOT_SIGN_KEY" > ./kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem
fi
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Build boot images
run: |
export AVBTOOL=$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin/avbtool

View File

@@ -107,15 +107,7 @@ jobs:
if [ ! -z "$BOOT_SIGN_KEY" ]; then
echo "$BOOT_SIGN_KEY" > ./kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem
fi
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Build boot images
run: |
export AVBTOOL=$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin/avbtool

View File

@@ -81,14 +81,6 @@ jobs:
echo "$BOOT_SIGN_KEY" > ./kernel-build-tools/linux-x86/share/avb/testkey_rsa2048.pem
fi
- name: Bot session cache
id: bot_session_cache
uses: actions/cache@v4
if: false
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Build boot images
run: |
export AVBTOOL=$GITHUB_WORKSPACE/kernel-build-tools/linux-x86/bin/avbtool

View File

@@ -84,7 +84,7 @@ jobs:
if [ "${{ matrix.spoofed }}" == "true" ]; then
echo "title=Spoofed-Manager" >> $GITHUB_OUTPUT
# maybe need a new var
echo "topicid=519956" >> $GITHUB_OUTPUT
echo "topicid=${{ vars.MESSAGE_SPOOFED_THREAD_ID }}" >> $GITHUB_OUTPUT
else
echo "title=Manager" >> $GITHUB_OUTPUT
echo "topicid=${{ vars.MESSAGE_THREAD_ID }}" >> $GITHUB_OUTPUT
@@ -179,14 +179,6 @@ jobs:
with:
name: "${{ steps.determine.outputs.title }}-mappings"
path: "manager/app/build/outputs/mapping/release/"
- name: Bot session cache
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'
id: bot_session_cache
uses: actions/cache@v4
with:
path: scripts/ksubot.session
key: ${{ runner.os }}-bot-session
- name: Upload to telegram
if: github.event_name != 'pull_request' && steps.need_upload.outputs.UPLOAD == 'true'

View File

@@ -2,6 +2,7 @@ import asyncio
import os
import sys
from telethon import TelegramClient
from telethon.sessions import StringSession
API_ID = 611335
API_HASH = "d524b414d21f4d37f08684c1df41ac9c"
@@ -73,11 +74,11 @@ def check_environ():
if BRANCH is None:
print("[-] Invalid BRANCH")
exit(1)
if MESSAGE_THREAD_ID is None and MESSAGE_THREAD_ID != "":
if MESSAGE_THREAD_ID and MESSAGE_THREAD_ID != "":
try:
MESSAGE_THREAD_ID = int(MESSAGE_THREAD_ID)
except:
print("[-] Invaild MESSAGE_THREAD_ID")
print("[-] Invalid MESSAGE_THREAD_ID")
exit(1)
else:
MESSAGE_THREAD_ID = None
@@ -92,9 +93,7 @@ async def main():
print("[-] No files to upload")
exit(1)
print("[+] Logging in Telegram with bot")
script_dir = os.path.dirname(os.path.abspath(sys.argv[0]))
session_dir = os.path.join(script_dir, "ksubot")
async with await TelegramClient(session=session_dir, api_id=API_ID, api_hash=API_HASH).start(bot_token=BOT_TOKEN) as bot:
async with await TelegramClient(StringSession(), API_ID, API_HASH).start(bot_token=BOT_TOKEN) as bot:
caption = [""] * len(files)
caption[-1] = get_caption()
print("[+] Caption: ")