Repository navigation
62 lines (52 loc) · 1.68 KB
/
Copy pathpatch.yml
File metadata and controls
62 lines (52 loc) · 1.68 KB
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
name: Patch
on:
workflow_dispatch:
inputs:
urls:
description: 'Direct URL to a FireOS 6 or FireOS 8 update.bin, or to a boot image'
required: true
jobs:
patch:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y brotli e2fsprogs zip
- name: Clone AIK-Linux-mirror
run: |
git clone https://github.com/SebaUbuntu/AIK-Linux-mirror.git
chmod +x AIK-Linux-mirror/*.sh
- name: Clone sdat2img
run: git clone https://github.com/xpirt/sdat2img.git
- name: Clone boot2root
run: |
git clone https://github.com/amazon-oss/boot2root.git
- name: Download and extract update
run: |
wget -O download.tmp "${{ github.event.inputs.urls }}"
if unzip -tq download.tmp > /dev/null 2>&1; then
unzip -q -o download.tmp
rm -f download.tmp
else
mv download.tmp boot.img
fi
- name: Execute patching script
run: |
chmod +x run.sh
./run.sh
- name: Extract ZIP contents
id: artifact
run: |
ZIP_FILE=$(ls boot-*.zip system-*.zip 2>/dev/null | head -n 1)
ZIP_NAME=$(basename "$ZIP_FILE" .zip)
mkdir -p artifact_contents
unzip -q "$ZIP_FILE" -d artifact_contents
echo "name=$ZIP_NAME" >> $GITHUB_OUTPUT
- name: Upload flashable ZIP
uses: actions/upload-artifact@v4
with:
name: ${{ steps.artifact.outputs.name }}
path: artifact_contents/