-
Notifications
You must be signed in to change notification settings - Fork 1
/
shrpci.yml
80 lines (75 loc) · 3.25 KB
/
shrpci.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: SHRP CI
on:
workflow_dispatch:
inputs:
pushtosf:
description: 'set this to true if you wanna push to sf (all small)'
required: true
env:
MANIFEST: "git://github.com/SHRP/platform_manifest_twrp_omni.git -b v3_10.0"
# Recovery Manifest URL with -b branch
DT_LINK: "https://github.com/SHRP-Devices/device_TECNO_CD6"
# Your Device Tree Link
VENDOR: "TECNO"
# Your Device's Vendor name as in used inside DT. Example: xiaomi, samsung, asus, etc.
CODENAME: "CD6"
# Your Device's Codename as in used inside DT." Example: nikel, phoenix, ginkgo, etc.
KERNEL_LINK: ""
# Kernel repo link with optional -b branch. Only for building kernel from source. Ignore if using prebuilt.
TARGET: "recoveryimage"
# Set as recoveryimage (or bootimage if no recovery partition avaiable)
FLAVOR: "eng"
# eng by default, change the variable if you want userdebug
EXTRA_CMD: ""
# For qualcomm devices put git clone https://github.com/omnirom/android_vendor_qcom_opensource_commonsys --depth=1 -b android-9.0 vendor/qcom/opensource/commonsys in EXTRA CMD
# If you want to Execute any external Command Before Compilation Starts
TZ: "Asia/Kolkata"
TOKEN: ${{ secrets.BOTTOKEN }}
jobs:
shrpCI:
runs-on: ubuntu-20.04
steps:
- name: Cleaning Up Runner
uses: rokibhasansagar/slimhub_actions@main
- name: Recovery Compilation
uses: ElytrA8/Recovery-Compiler@production
- name: PUSH To TG
run: |
cd ${BuildPath}/out/target/product/${CODENAME}/
ZIP=$(echo *stable*.zip)
curl -F document=@$ZIP "https://api.telegram.org/bot$TOKEN/sendDocument" \
-F chat_id="-1001296548298" \
-F "disable_web_page_preview=true" \
-F "parse_mode=html" \
-F caption=" <i> SHRP Recovery </i> for <b> '$VENDOR' '$CODENAME' </b> is Available for Testing Purposes Only | Build finished on <b> $(date) </b> | <i> #SHRP Recovery </i> "
ZIP=$(echo *AddonRescue*.zip)
curl -F document=@$ZIP "https://api.telegram.org/bot$TOKEN/sendDocument" \
-F chat_id="-1001296548298" \
-F "disable_web_page_preview=true" \
-F "parse_mode=html" \
-F caption=" <i> SHRP AddOnRescue </i> for <b> '$VENDOR' '$CODENAME' </b> | <i> #SHRP Recovery </i> "
- name: PUSH to SF
if: ${{ github.event.inputs.pushtosf }} == 'true'
run: |
cd ${BuildPath}/out/target/product/${CODENAME}/
sudo apt-get install expect -y
expect -c '
spawn sftp ${{ secrets.SFUSER }}@frs.sourceforge.net
expect \"yes/no\"
send "yes\r"
expect \"Password\"
send "${{ secrets.SFPASS }}\r"
expect \"sftp> \"
send "cd cd /home/frs/project/shrp/${CODENAME}/\r"
set timeout -1
send "put *stable*.zip\r"
expect "Uploading"
expect "*100%*"
expect "sftp*"
send "put *AddonRescue*.zip\r"
expect "Uploading"
expect "*100%*"
expect "sftp*"
send "bye\r"
interact
'