From d958e6d7e7af0d149a368c12045d163236061fa8 Mon Sep 17 00:00:00 2001 From: weishu Date: Wed, 20 Mar 2024 15:34:06 +0800 Subject: [PATCH] ci: only post manager to tg --- .github/workflows/build-kernel-arcvm.yml | 33 +----------------------- .github/workflows/build-su.yml | 27 +------------------ .github/workflows/wsa-kernel.yml | 33 +----------------------- 3 files changed, 3 insertions(+), 90 deletions(-) diff --git a/.github/workflows/build-kernel-arcvm.yml b/.github/workflows/build-kernel-arcvm.yml index 798a925fb0ce..715f84313041 100644 --- a/.github/workflows/build-kernel-arcvm.yml +++ b/.github/workflows/build-kernel-arcvm.yml @@ -114,35 +114,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: kernel-ARCVM-${{ matrix.arch }}-${{ matrix.version }} - path: "${{ env.file_path }}" - - - name: Bot session cache - if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }} - id: bot_session_cache - uses: actions/cache@v4 - with: - path: scripts/ksubot.session - key: ${{ runner.os }}-bot-session - - - name: Post to Telegram - if: ${{ ( github.event_name == 'push' && github.ref == 'refs/heads/main' ) || github.ref_type == 'tag' }} - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - BOT_TOKEN: ${{ secrets.BOT_TOKEN }} - MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }} - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - COMMIT_URL: ${{ github.event.head_commit.url }} - RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - run: | - TITLE=kernel-ARCVM-${{ matrix.arch }}-${{ matrix.version }} - echo "[+] title: $TITLE" - export TITLE - export VERSION="${{ env.kernelsu_version }}" - echo "[+] Compress images" - gzip -n -f -9 "${{ env.file_path }}" - echo "[+] Image to upload" - ls -l "${{ env.file_path }}.gz" - if [ -n "${{ secrets.BOT_TOKEN }}" ]; then - pip3 install telethon==1.31.1 - python3 "$GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py" "${{ env.file_path }}.gz" - fi + path: "${{ env.file_path }}" \ No newline at end of file diff --git a/.github/workflows/build-su.yml b/.github/workflows/build-su.yml index c819994c3891..b3b1c68533a3 100644 --- a/.github/workflows/build-su.yml +++ b/.github/workflows/build-su.yml @@ -36,29 +36,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: su - path: ./userspace/su/libs - - 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' - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - BOT_TOKEN: ${{ secrets.BOT_TOKEN }} - MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }} - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - COMMIT_URL: ${{ github.event.head_commit.url }} - RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - TITLE: SU - run: | - if [ ! -z "${{ secrets.BOT_TOKEN }}" ]; then - export VERSION=$(git rev-list --count HEAD) - pip3 install telethon==1.31.1 - mv ./userspace/su/libs/arm64-v8a/su su-arm64 - mv ./userspace/su/libs/x86_64/su su-x86_64 - python3 scripts/ksubot.py su-arm64 su-x86_64 - fi + path: ./userspace/su/libs \ No newline at end of file diff --git a/.github/workflows/wsa-kernel.yml b/.github/workflows/wsa-kernel.yml index d0f9660dedf4..447fb80eef20 100644 --- a/.github/workflows/wsa-kernel.yml +++ b/.github/workflows/wsa-kernel.yml @@ -101,35 +101,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: kernel-WSA-${{ inputs.arch }}-${{ inputs.version }} - path: "${{ env.file_path }}" - - - name: Bot session cache - if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag' - id: bot_session_cache - uses: actions/cache@v4 - with: - path: scripts/ksubot.session - key: ${{ runner.os }}-bot-session - - - name: Post to Telegram - if: github.event_name == 'push' && github.ref == 'refs/heads/main' || github.ref_type == 'tag' - env: - CHAT_ID: ${{ secrets.CHAT_ID }} - BOT_TOKEN: ${{ secrets.BOT_TOKEN }} - MESSAGE_THREAD_ID: ${{ secrets.MESSAGE_THREAD_ID }} - COMMIT_MESSAGE: ${{ github.event.head_commit.message }} - COMMIT_URL: ${{ github.event.head_commit.url }} - RUN_URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} - run: | - TITLE=kernel-${{ inputs.arch }}-WSA-${{ inputs.version }} - echo "[+] title: $TITLE" - export TITLE - export VERSION="${{ env.kernelsu_version }}" - echo "[+] Compress images" - gzip -n -f -9 "${{ env.file_path }}" - echo "[+] Image to upload" - ls -l "${{ env.file_path }}.gz" - if [ -n "${{ secrets.BOT_TOKEN }}" ]; then - pip3 install telethon==1.31.1 - python3 "$GITHUB_WORKSPACE/KernelSU/scripts/ksubot.py" "${{ env.file_path }}.gz" - fi + path: "${{ env.file_path }}" \ No newline at end of file