Create a zip for Magisk #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create a zip for Magisk | |
on: | |
workflow_dispatch: | |
inputs: | |
model: | |
description: 'Your Model Number' | |
required: true | |
imei: | |
description: 'Your IMEI' | |
required: true | |
csc: | |
description: 'Your CSC (Samsung Region code)' | |
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 | |
sudo apt install python3 python-is-python3 -y > /dev/null 2>&1 | |
- name: Set environment variables | |
run: | | |
echo "MODEL=${{ github.event.inputs.model }}" >> $GITHUB_ENV | |
echo "IMEI=${{ github.event.inputs.imei }}" >> $GITHUB_ENV | |
echo "CSC=${{ github.event.inputs.csc }}" >> $GITHUB_ENV | |
- 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 }} | |
token: ${{ secrets.TELEGRAM_BOT_TOKEN }} | |
document: Dist/${{ github.event.inputs.model }}*.xz | |
format: html | |
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> |