forked from ravindu644/samloader-actions
-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 2.15 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
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>