forked from Android-FW-Dumps/AndroidDumpsCI
-
Notifications
You must be signed in to change notification settings - Fork 17
71 lines (58 loc) · 1.96 KB
/
DumprX.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
name: DumprX
on:
workflow_dispatch:
inputs:
ROM_URL:
description: "Direct Link of the ROM/Firmware to Dump"
required: true
EXTRA_CMD:
description: "Any Extra Command to Run Before Dump"
required: false
defaults:
run:
shell: bash
env:
# ROM
ROM_URL: ${{ github.event.inputs.ROM_URL }}
# Gitlab
PUSH_TO_GITLAB: true
# Extra Command
EXTRA_CMD: ${{ github.event.inputs.EXTRA_CMD }}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkouts
uses: actions/checkout@v2
- name: Clone Our Firmware Dumper
run: |
git clone https://github.com/DumprX/DumprX.git DumprX
- name: Setup DumprX's Environment
working-directory: DumprX
run: |
sudo bash setup.sh
sudo apt install -y f2fs-tools
mkdir -p ~/.ssh
ssh-keyscan -t rsa github.com >> ~/.ssh/known_hosts
ssh-keyscan -t rsa gitlab.com >> ~/.ssh/known_hosts
git config --global user.name "Sushrut1101"
git config --global user.email "[email protected]"
- name: Setup Config envs
working-directory: DumprX
run: |
# echo "${{ secrets.GIT_TOKEN }}" > .github_token
# echo "${{ secrets.GIT_ORG_NAME }}" > .github_orgname
echo "${{ secrets.GITLAB_TOKEN }}" > .gitlab_token # Only for Gitlab
echo "${{ secrets.GITLAB_GROUP }}" > .gitlab_group # Only for Gitlab
echo "${{ secrets.PRIV_SSH_KEY }}" > ~/.ssh/id_rsa # Only for Gitlab
echo "${{ secrets.BOT_TOKEN }}" > .tg_token
echo "${{ secrets.CHAT_ID }}" > .tg_chat
chmod 600 ~/.ssh/id_rsa
- name: Run the Extra Command
working-directory: DumprX
run: |
$EXTRA_CMD
- name: Start Dumping
working-directory: DumprX
run: |
./dumper.sh "$ROM_URL"