-
Notifications
You must be signed in to change notification settings - Fork 72
101 lines (88 loc) · 2.82 KB
/
defconfig.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
#
# Copyright (c) 2022-2023 SMALLPROGRAM <https://github.com/smallprogram/OpenWrtAction>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/smallprogram/OpenWrtAction
# Description: Build OpenWrt using GitHub Actions
#
name: defconfig
on:
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: 'false'
is_display_detailed:
description: 'Whether to display detailed information about compilation'
required: false
default: 'false'
is_single_threaded:
description: 'Whether single-threaded compilation'
required: false
default: 'false'
# schedule:
# - cron: 0 */8 * * *
env:
REPO_URL: https://github.com/coolsnowwolf/lede
REPO_BRANCH: master
FEEDS_CONF: feeds_config/lean.feeds.conf.default
CONFIGS: config/leanlede_config
DIY_P1_SH: diy_script/lean_diy/diy-part1.sh
DIY_P2_SH: diy_script/lean_diy/diy-part2.sh
MAKE_DEFCONFIG_SH: compile_script/step01_make_defconfig.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_ARTIFACT: false
UPLOAD_RELEASE: true
TZ: Asia/Shanghai
jobs:
job_init:
runs-on: ubuntu-latest
name: Build-Openwrt-Init
outputs:
output_release_tag: ${{ steps.gen_release_tag.outputs.release_tag }}
steps:
- id: gen_release_tag
run: |
echo "release_tag=multi-platform_$(date +"%Y.%m.%d_%H.%M.%S")" >> $GITHUB_OUTPUT
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
- name: Checkout
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Clone source code
working-directory: /workdir
run: |
git clone $REPO_URL -b $REPO_BRANCH openwrt
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
- name: Load custom feeds
run: |
[ -e $FEEDS_CONF ] && cp -r $FEEDS_CONF openwrt/feeds.conf.default
chmod +x $DIY_P1_SH
cd openwrt
$GITHUB_WORKSPACE/$DIY_P1_SH
- name: Update feeds
run: cd openwrt && ./scripts/feeds update -a
- name: Install feeds
run: cd openwrt && ./scripts/feeds install -a
- name: Make defconfig custom configuration
run: |
chmod +x $DIY_P2_SH
chmod +x $MAKE_DEFCONFIG_SH
cd openwrt
$GITHUB_WORKSPACE/$DIY_P2_SH
$GITHUB_WORKSPACE/$MAKE_DEFCONFIG_SH
- name: Git auto update config
uses: stefanzweifel/[email protected]
id: commit
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit_message: auto update config
branch: main
commit_author: smallprogram <[email protected]>