Skip to content

Commit

Permalink
Toggle to turn the telegram upload on/off
Browse files Browse the repository at this point in the history
  • Loading branch information
ravindu644 committed Sep 24, 2024
1 parent 3e9f6a0 commit ddfa596
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
name: Create a zip for Magisk

on:
workflow_dispatch:
inputs:
Expand All @@ -11,20 +10,23 @@ on:
required: true
csc:
description: 'Your CSC (Samsung Region code)'
required: true

required: true
upload_to_telegram:
description: 'Upload to Telegram'
type: boolean
required: true
default: false

jobs:
samloader-actions:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Install packages & setup
run: |
sudo apt update -y > /dev/null 2>&1
Expand All @@ -39,14 +41,13 @@ jobs:
- name: Running samloader-actions
run: |
bash sam.sh
- name: Uploading Stock Files
uses: actions/upload-artifact@v4
with:
name: "Stock files - ${{ env.MODEL }}"
path: Dist/${{ github.event.inputs.model }}*.xz

- name: Upload to Telegram
if: ${{ github.event.inputs.upload_to_telegram == 'true' }}
uses: appleboy/telegram-action@master
with:
to: ${{ secrets.TELEGRAM_CHAT_ID }}
Expand All @@ -56,8 +57,7 @@ jobs:
disable_web_page_preview: false
message: |
<b>New Dump 📂..!</b>
<b>Device :</b> ${{ env.MODEL }}
<b>From Repository:</b> <a href="https://github.com/${{ github.repository }}">${{ github.repository }}</a>
<b>Powered by:</b> <a href="https://github.com/ravindu644/samloader-actions">samloader-actions</a>
<b>Powered by:</b> <a href="https://github.com/ravindu644/samloader-actions">samloader-actions</a>

0 comments on commit ddfa596

Please sign in to comment.