forked from openwrt/openwrt
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: aUsernameWoW <[email protected]>
- Loading branch information
1 parent
52a225c
commit 03343af
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Build OpenWRT | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up environment | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y build-essential libncurses5-dev gawk git gettext libssl-dev xsltproc zip zlib1g-dev file wget unzip python | ||
- name: Clone OpenWRT | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
./scripts/feeds update -a | ||
./scripts/feeds install -a | ||
- name: Configure OpenWRT | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
cp .config.example .config # 替换为你的实际配置文件路径 | ||
make defconfig | ||
- name: Build OpenWRT | ||
run: | | ||
cd $GITHUB_WORKSPACE | ||
make -j$(nproc) | ||
- name: Upload firmware | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: openwrt-firmware | ||
path: | | ||
bin/targets/* |