-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (58 loc) · 2.11 KB
/
build.yaml
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
name: OpenWrt Image
on:
# push:
# branches:
# - main
#schedule:
# - cron: 30 13 * * 6
workflow_dispatch:
env:
REPO_URL: https://github.com/coolsnowwolf/lede.git
REPO_BRANCH: master
FEEDS_CONF: feeds.conf.default
CONFIG_FILE: config
UPLOAD_COWTRANSFER: false
UPLOAD_WETRANSFER: true
jobs:
Build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@main
- name: Initialization environment
env:
DEBIAN_FRONTEND: noninteractive
run: bash ./scripts/install-dependencies.sh
- name: Get Sources
run: bash ./scripts/get_sources.sh
- name: Compile the firmware
id: compile
working-directory: /workdir/openwrt
run: |
echo -e "$(nproc) thread compile"
make -j$(nproc) || make -j1 || make -j1 V=s
echo "::set-output name=status::success"
- name: Organize files
id: organize
run: |
cd openwrt/bin/targets/*/*
rm -rf packages
echo "FIRMWARE=$PWD" >> $GITHUB_ENV
echo "::set-output name=status::success"
- name: Upload firmware to cowtransfer
id: cowtransfer
if: steps.organize.outputs.status == 'success' && env.UPLOAD_COWTRANSFER == 'true' && !cancelled()
run: |
curl -fsSL git.io/file-transfer | sh
./transfer cow --block 2621440 -s -p 64 --no-progress ${FIRMWARE} 2>&1 | tee cowtransfer.log
echo "::warning file=cowtransfer.com::$(cat cowtransfer.log | grep https)"
echo "::set-output name=url::$(cat cowtransfer.log | grep https | cut -f3 -d" ")"
- name: Upload firmware to WeTransfer
id: wetransfer
if: steps.organize.outputs.status == 'success' && env.UPLOAD_WETRANSFER == 'true' && !cancelled()
run: |
curl -fsSL git.io/file-transfer | sh
./transfer wet -s -p 16 --no-progress ${FIRMWARE} 2>&1 | tee wetransfer.log
echo "::warning file=wetransfer.com::$(cat wetransfer.log | grep https)"
echo "::set-output name=url::$(cat wetransfer.log | grep https | cut -f3 -d" ")"