forked from 1orz/My-action
-
Notifications
You must be signed in to change notification settings - Fork 0
74 lines (65 loc) · 2.66 KB
/
Build-Lean-lede.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
name: Build-Lean-lede
on:
workflow_dispatch:
# push:
# branches:
# - master
# paths:
# - 'lean-lede/x86_64/.config'
#schedule:
# - cron: 0 */6 * * *
jobs:
x86:
runs-on: ubuntu-latest
steps:
- name: Prepare environment.
env:
DEBIAN_FRONTEND: noninteractive
run: |
bash <(curl -fsSL https://raw.githubusercontent.com/ythyty/My-action/master/lean-lede/prenv.sh)
- name: Checkout repo
uses: actions/checkout@v2
with:
repository: coolsnowwolf/lede
- name: Download and Load custom configuration
run: |
curl -fsSL https://raw.githubusercontent.com/ythyty/My-action/master/lean-lede/x86_64/.config >.config
bash <(curl -fsSL https://raw.githubusercontent.com/ythyty/My-action/master/lean-lede/diy.sh)
make defconfig
- name: Download package
run: |
make download -j8
find dl -size -1024c -exec rm -f {} \;
sudo df -h
- name: When Multi-core compile failure will be rollback to Single core compile
run: |
echo -e "Will be use $(nproc) thread compile"
sudo df -h
make -j$(nproc) || make -j2 || make -j1 V=s
sudo df -h
- name: Upload entire bin directory
uses: actions/upload-artifact@v2
if: always()
with:
name: LEDE-x86_64-bin-dictionary
path: lede/bin
- name: Only Upload Packages to Download Station
if: success()
run: |
cd bin
zip -r -o -q -9 x86_64-Package.zip . -i *.ipk
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Router/LEDE/x86_64/Lean-Package" -F "file=@x86_64-Package.zip" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
#curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Router/LEDE/x86_64/Lean-Package" -F "file=@x86_64-Package.zip" ${{ secrets.CN_STATION_PROCESSOR }}
- name: Only Upload firmware (Without packages)
uses: actions/upload-artifact@v2
if: always()
with:
name: x86_64
path: bin/targets/*/*
- name: Upload firmware to Download Station (Without packages)
if: success()
run: |
cd bin/targets/*/*
zip -r -o -q -9 x86_64.zip . -i *.gz
curl -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Router/LEDE/x86_64/Lean" -F "file=@x86_64.zip" ${{ secrets.MAIN_UPLOAD_PROCESSOR }}
#curl --socks5 ${{ secrets.PROXY_ADDR }} -U ${{ secrets.PROXY_USER }} -F "token=${{ secrets.UPLOAD_TOKEN }}" -F "location=Router/LEDE/x86_64/Lean" -F "file=@x86_64.zip" ${{ secrets.CN_STATION_PROCESSOR }}