forked from Tonyha7/build_twrp_device_tree
-
Notifications
You must be signed in to change notification settings - Fork 80
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 84e2a3d
Showing
1 changed file
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
name: Gen | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
IMG: | ||
description: 'IMG直链' | ||
required: true | ||
default: '' | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check Out | ||
uses: actions/checkout@v3 | ||
|
||
- name: 准备环境 | ||
run: | | ||
sudo apt update | ||
sudo apt -y install cpio wget | ||
- name: 准备Python3 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
|
||
- name: 准备twrpdtgen | ||
run: pip install -r requirements.txt | ||
|
||
- name: 下载 | ||
run: wget ${{ github.event.inputs.IMG }} | ||
|
||
- name: Start build | ||
run: | | ||
mkdir dt | ||
python3 -m twrpdtgen -o dt/ *.img | ||
- name: ZIP device tree | ||
run: | | ||
zip -r DeviceTree.zip ./dt/* | ||
- name: Upload to Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: | | ||
./DeviceTree.zip | ||
name: TWRP_Device_Tree-${{ github.run_id }} | ||
tag_name: ${{ github.run_id }} | ||
body: DeviceTree for twrp | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |