Skip to content

Commit

Permalink
Create build-openwrt.yml
Browse files Browse the repository at this point in the history
Signed-off-by: aUsernameWoW <[email protected]>
  • Loading branch information
aUsernameWoW authored May 19, 2024
1 parent 52a225c commit 03343af
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build-openwrt.yml
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/*

0 comments on commit 03343af

Please sign in to comment.