forked from Area69Lab/Recovery-builder
-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (71 loc) · 3.01 KB
/
recovery.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
81
82
83
84
name: Orange-Fox
on:
workflow_dispatch:
schedule:
- cron: '0 12 5 * *'
env:
MANIFEST: https://gitlab.com/OrangeFox/Manifest.git -b fox_9.0
DEVICE: markw
DT_LINK: https://github.com/Tostisto/device_xiaomi_markw_twrp.git
DT_PATH: device/xiaomi/markw
TOKEN: ${{ secrets.TELEGRAM_TOKEN }}
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@master
- name: Cleaning Up Runner
uses: rokibhasansagar/slimhub_actions@main
- name: Initializing environment
run: |
sudo -E apt-get clean
sudo -E apt-get -qq update
sudo -E apt-get -qq install bc build-essential zip curl libstdc++6 git wget python gcc clang libssl-dev repo rsync flex curl bison aria2
sudo curl --create-dirs -L -o /usr/local/bin/repo -O -L https://storage.googleapis.com/git-repo-downloads/repo
sudo chmod a+rx /usr/local/bin/repo
- name: Sync recovery source and device tree
run: |
mkdir recovery
cd recovery
repo init -u $MANIFEST --depth=1 --groups=all,-notdefault,-device,-darwin,-x86,-mips
repo sync -j4
git clone $DT_LINK --depth=1 --single-branch $DT_PATH
- name: Build
run: |
cd recovery
. build/envsetup.sh
lunch omni_$DEVICE-eng
export ALLOW_MISSING_DEPENDENCIES=true
make recoveryimage
- uses: actions/upload-artifact@v2
with:
name: recoveryzip
path: recovery/out/target/product/markw/OrangeFox-Unofficial-markw.zip
- uses: actions/upload-artifact@v2
with:
name: recoveryimage
path: recovery/out/target/product/markw/OrangeFox-Unofficial-markw.img
- name: Releasing
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
title: "OrangeFox recovery"
prerelease: false
files: |
recovery/out/target/product/markw/OrangeFox-Unofficial-markw.zip
recovery/out/target/product/markw/OrangeFox-Unofficial-markw.img
recovery/out/target/product/markw/recovery.img
- name: Upload to Telegram
run: |
ZIP=$(echo recovery/out/target/product/markw/OrangeFox-Unofficial-markw.zip)
curl -F document=@$ZIP "https://api.telegram.org/bot$TOKEN/sendDocument" \
-F chat_id="-438861843" \
-F "disable_web_page_preview=true" \
-F "parse_mode=html" \
ZIP=$(echo recovery/out/target/product/markw/OrangeFox-Unofficial-markw.img)
curl -F document=@$ZIP "https://api.telegram.org/bot$TOKEN/sendDocument" \
-F chat_id="-438861843" \
-F "disable_web_page_preview=true" \
-F "parse_mode=html" \