forked from Pinkdoge/actions_build_recovery
-
Notifications
You must be signed in to change notification settings - Fork 1
104 lines (90 loc) · 4.43 KB
/
actions_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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
name: rec-building
on:
watch:
types: [started]
jobs:
build:
if: github.event.repository.owner.id == github.event.sender.id
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@main
- name: Clean Up
run: |
docker rmi `docker images -q`
sudo rm -rf /usr/share/dotnet /etc/mysql /etc/php /etc/sudo apt/sources.list.d
sudo apt -y purge azure-cli ghc* zulu* hhvm llvm* firefox google* dotnet* powershell openjdk* mysql* php*
sudo apt update
sudo apt -y autoremove --purge
sudo apt clean
- name: Update packages
run: |
sudo apt update
sudo apt full-upgrade
- name: Install required packages
run: sudo apt install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev tree lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip jq
- name: Install Repo
run: |
mkdir ~/bin
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
sudo apt-get autoclean
- name: Get variables
run: |
echo "::set-output name=twrp_url::$(jq -r '.twrp_url' config.json)"
echo "::set-output name=twrp_branch::$(jq -r '.twrp_branch' config.json)"
echo "::set-output name=git_username::$(jq -r '.git_username' config.json)"
echo "::set-output name=git_email::$(jq -r '.git_email' config.json)"
echo "::set-output name=use_own_dt::$(jq -r '.use_own_dt' config.json)"
echo "::set-output name=dt_url::$(jq -r '.dt_url' config.json)"
echo "::set-output name=dt_remote::$(jq -r '.dt_remote' config.json)"
echo "::set-output name=dt_branch::$(jq -r '.dt_branch' config.json)"
echo "::set-output name=dt_path::$(jq -r '.dt_path' config.json)"
echo "::set-output name=device_code::$(jq -r '.device_code' config.json)"
echo "::set-output name=fix_product::$(jq -r '.fix_product' config.json)"
echo "::set-output name=fix_misscom::$(jq -r '.fix_misscom' config.json)"
echo "::set-output name=fix_busybox::$(jq -r '.fix_busybox' config.json)"
echo "::set-output name=fix_branch::$(jq -r '.fix_branch' config.json)"
echo "::set-output name=date::$(date +%F)"
id: var
- name: Initialize a Repo client
run: |
PATH=~/bin:$PATH
mkdir ~/workspace
cd ~/workspace
echo "::set-output name=pwd::$(pwd)"
git config --global user.name "${{ steps.var.outputs.git_username }}"
git config --global user.email "${{ steps.var.outputs.git_email }}"
repo init --depth=1 -u https://gitlab.com/OrangeFox/Manifest.git -b fox_9.0
repo sync -j$(nproc --all) --force-sync
git clone https://${{ steps.var.outputs.dt_remote }}/${{ steps.var.outputs.dt_url }}.git ${{ steps.var.outputs.dt_path }}
rm -rf bootable/recovery/gui/theme
git clone https://gitlab.com/OrangeFox/misc/theme.git bootable/recovery/gui/theme
mkdir /home/runner/workspace/out
mkdir /home/runner/workspace/out/target
mkdir /home/runner/workspace/out/target/product
mkdir /home/runner/workspace/out/target/product/PBCM10
mkdir /home/runner/workspace/out/target/product/PBCM10/system
mkdir /home/runner/workspace/out/target/product/PBCM10/system/etc/
cp /home/runner/workspace/device/oppo/PBCM10/recovery/root/system/etc/ld.config.txt /home/runner/workspace/out/target/product/PBCM10/system/etc/ld.config.txt
- name: Start Building
run: |
PATH=~/bin:$PATH
cd ~/workspace
ls
tree device
export ALLOW_MISSING_DEPENDENCIES=true
source build/envsetup.sh
export FOX_USE_TWRP_RECOVERY_IMAGE_BUILDER=1
export OF_MAINTAINER="ghhccghk"
lunch twrp_${{ steps.var.outputs.device_code }}-eng
mka recoveryimage -j$(nproc --all)
- name: Upload REC
uses: softprops/action-gh-release@v1
with:
files: /home/runner/workspace/out/target/product/PBCM10/OrangeFox-Unofficial-PBCM10.img
name: ${{ steps.var.outputs.date }} ${{ steps.var.outputs.device_code }} by ${{ steps.var.outputs.git_username }}
tag_name: ${{ github.run_id }}
body: Android Third-Party Recovery built by ${{ steps.var.outputs.git_username }}
env:
GITHUB_TOKEN: ${{ secrets.helpmi }}