-
Notifications
You must be signed in to change notification settings - Fork 35
87 lines (76 loc) · 3.94 KB
/
Build_DS3615xs_7.1.0-42661.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
name: Build DS3615xs 7.1.0-42661
on:
workflow_dispatch:
inputs:
clean_cache:
description: 'Clear caches'
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
name: 编译 "${{matrix.platform}} ${{matrix.version}}"
strategy:
fail-fast: false
matrix:
include:
- platform: DS3615xs
version: 7.1.0-42661
steps:
- name: 检出项目文件
uses: actions/checkout@v3
- name: 获取当前时间
id: date
run: echo "::set-output name=today::$(date +'%Y-%m-%d')"
- name: 获取项目描述
id: desc
run: |
wget https://raw.githubusercontent.com/Online24Hours/Redpill_Build/main/README.MD -O /home/runner/desc.txt
echo "::set-output name=description::$(cat /home/runner/desc.txt)"
- name: 环境准备
run: |
sudo apt update
sudo apt-get install -y curl bspatch jq git
git clone https://github.com/pocopico/redpill-load.git /home/runner/redpill-load
wget https://raw.githubusercontent.com/Online24Hours/Redpill_Build/main/ds3615xs_user_config.json -O /home/runner/redpill-load/ds3615xs_user_config.json
wget https://raw.githubusercontent.com/pocopico/rp-ext/main/redpill/releases/redpill-3.10.108.tgz
tar zxvf redpill-3.10.108.tgz -C ./
mv ./redpill.ko /home/runner/redpill-load/ext/rp-lkm/redpill-linux-v3.10.108.ko
rm -rf /home/runner/redpill-load/config/${{matrix.platform}}/${{matrix.version}}/config.json
wget https://raw.githubusercontent.com/Online24Hours/Redpill_Build/main/config/${{matrix.platform}}_config.json -O /home/runner/redpill-load/config/${{matrix.platform}}/${{matrix.version}}/config.json
- name: 解密PAT文件
run: |
cd /home/runner/redpill-load/cache
wget https://raw.githubusercontent.com/Online24Hours/Redpill_Build/main/UNPACK/${{matrix.platform}}_${{matrix.version}}.sh -O /home/runner/redpill-load/cache/UNPACK.sh
chmod +x /home/runner/redpill-load/cache/UNPACK.sh
/home/runner/redpill-load/cache/UNPACK.sh
sudo rm -rf /home/runner/redpill-load/cache/UNPACK.sh
sha256sum /home/runner/redpill-load/cache/* > /home/runner/redpill-load/cache/check.sha256
sed -i s/1e95d8c63981bcf42ea2eaedfbc7acc4248ff16d129344453b7479953f9ad145/$(awk '{print $1}' "/home/runner/redpill-load/cache/check.sha256")/g /home/runner/redpill-load/config/${{matrix.platform}}/${{matrix.version}}/config.json
sudo rm -rf /home/runner/redpill-load/cache/check.sha256
- name: 添加扩展驱动
run: |
cd /home/runner/redpill-load
./ext-manager.sh add 'https://github.com/jumkey/redpill-load/raw/develop/redpill-misc/rpext-index.json'
./ext-manager.sh add 'https://github.com/pocopico/redpill-load/raw/develop/redpill-acpid/rpext-index.json'
./ext-manager.sh add 'https://raw.githubusercontent.com/pocopico/rp-ext/master/vmxnet3/rpext-index.json'
- name: 编译引导
run: |
cd /home/runner/redpill-load
sudo BRP_JUN_MOD=1 BRP_DEBUG=1 BRP_USER_CFG=ds3615xs_user_config.json ./build-loader.sh '${{matrix.platform}}' '${{matrix.version}}'
- name: 上传引导镜像到 Github Releases
uses: softprops/action-gh-release@v1
with:
tag_name: Redpill-load
name: ${{matrix.version}} Build ${{steps.date.outputs.today}}
body: ${{steps.desc.outputs.description}}
draft: false
prerelease: false
files: |
/home/runner/redpill-load/images/*.img
# - name: 上传引导镜像到 Github Actions
# uses: actions/upload-artifact@v3
# with:
# name: ${{matrix.platform}} ${{matrix.version}}
# path: /home/runner/redpill-load/images/*.img
# if-no-files-found: error