From 56795d993e443d5336639175e4fedb9b077b7ca1 Mon Sep 17 00:00:00 2001 From: Nikhil Badyal Date: Thu, 13 Oct 2022 21:52:28 +0530 Subject: [PATCH] =?UTF-8?q?=F0=9F=91=B7=20Reusable=20telegram=20upload?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-apk.yml | 21 ++++++++------------- .github/workflows/telegram-uploader.yml | 3 ++- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/build-apk.yml b/.github/workflows/build-apk.yml index 64d52f5..a6e0db2 100644 --- a/.github/workflows/build-apk.yml +++ b/.github/workflows/build-apk.yml @@ -78,18 +78,13 @@ jobs: sleep 10 upload-to-telegram: - name: Telegram Upload - runs-on: ubuntu-latest - timeout-minutes: 5 needs: [ build-apk ] - steps: - - name: Upload to Telegram - uses: nikhilbadyal/ghaction-telegram-uploader@main - if: ${{ env.HAVE_TELEGRAM_API_ID == 'true' }} - with: - API_ID: ${{ secrets.TELEGRAM_API_ID }} - API_HASH: ${{ secrets.TELEGRAM_API_HASH }} - BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} - CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} - STICKER_ID: ${{ secrets.STICKER_ID }} + uses: ./.github/workflows/telegram-uploader.yml + secrets: + TELEGRAM_API_ID: ${{ secrets.TELEGRAM_API_ID }} + TELEGRAM_API_HASH: ${{ secrets.TELEGRAM_API_HASH }} + TELEGRAM_BOT_TOKEN: ${{ secrets.TELEGRAM_BOT_TOKEN }} + TELEGRAM_CHAT_ID: ${{ secrets.TELEGRAM_CHAT_ID }} + STICKER_ID: ${{ secrets.STICKER_ID }} + diff --git a/.github/workflows/telegram-uploader.yml b/.github/workflows/telegram-uploader.yml index 20a3ac7..5957573 100644 --- a/.github/workflows/telegram-uploader.yml +++ b/.github/workflows/telegram-uploader.yml @@ -17,7 +17,8 @@ on: jobs: tg-upload: - timeout-minutes: 10 + name: Telegram Upload + timeout-minutes: 5 runs-on: ubuntu-latest steps: - name: Upload to Telegram