👷 Reusable workflow

This commit is contained in:
Nikhil Badyal
2022-10-13 21:43:44 +05:30
parent f3162c77ef
commit 57fde567f7
2 changed files with 19 additions and 14 deletions
+6 -13
View File
@@ -27,17 +27,10 @@ on:
jobs:
tg-upload:
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Upload to Telegram
if: ${{ env.HAVE_TELEGRAM_API_ID == 'true' }}
uses: nikhilbadyal/ghaction-telegram-uploader@main
with:
API_ID: ${{ inputs.API_ID }}
API_HASH: ${{ inputs.API_HASH }}
BOT_TOKEN: ${{ inputs.BOT_TOKEN }}
CHAT_ID: ${{ inputs.CHAT_ID }}
uses: ./.github/workflows/telegram-uploader.yml
secrets:
TELEGRAM_API_ID: ${{ inputs.API_ID }}
TELEGRAM_API_HASH: ${{ inputs.API_HASH }}
TELEGRAM_BOT_TOKEN: ${{ inputs.BOT_TOKEN }}
TELEGRAM_CHAT_ID: ${{ inputs.CHAT_ID }}
STICKER_ID: ${{ inputs.STICKER_ID }}
env:
HAVE_TELEGRAM_API_ID: ${{ inputs.API_ID != '' }}
+12
View File
@@ -2,6 +2,18 @@ name: Telegram Upload
on:
workflow_dispatch:
workflow_call:
secrets:
TELEGRAM_API_ID:
required: true
TELEGRAM_API_HASH:
required: true
TELEGRAM_BOT_TOKEN:
required: true
TELEGRAM_CHAT_ID:
required: true
STICKER_ID:
required: true
jobs:
tg-upload: