Create build.yml
This commit is contained in:
parent
e9dac128ed
commit
cb264f70cc
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: 编译luci-app-caddy
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- name: 下载工具链
|
||||||
|
run: |
|
||||||
|
sudo timedatectl set-timezone Asia/Shanghai
|
||||||
|
wget -qO /opt/sdk.tar.xz https://downloads.openwrt.org/releases/22.03.5/targets/rockchip/armv8/openwrt-sdk-22.03.5-rockchip-armv8_gcc-11.2.0_musl.Linux-x86_64.tar.xz
|
||||||
|
tar -xJf /opt/sdk.tar.xz -C /opt
|
||||||
|
git clone https://github.com/lmq8267/luci-app-caddy.git /opt/caddy
|
||||||
|
cd /opt/openwrt-sdk*/package
|
||||||
|
cp -R /opt/caddy/luci-app-caddy .
|
||||||
|
cd /opt/openwrt-sdk*
|
||||||
|
./scripts/feeds update -a
|
||||||
|
make defconfig
|
||||||
|
- name: 开始编译
|
||||||
|
run: |
|
||||||
|
cd /opt/openwrt-sdk*
|
||||||
|
make package/luci-app-caddy/compile V=s -j1
|
||||||
|
cd /opt/openwrt-sdk*/bin/packages/aarch64_generic/base
|
||||||
|
ls
|
||||||
|
mv *.ipk luci-app-caddy_all.ipk
|
||||||
|
echo "build_time=$(date '+%Y-%m-%d %H:%M:%S')" >> $GITHUB_ENV
|
||||||
|
echo "tag=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
|
||||||
|
- name: 发布
|
||||||
|
uses: softprops/action-gh-release@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.c8 }}
|
||||||
|
body: |
|
||||||
|
> ### 编译时间 :${{ env.build_time }}
|
||||||
|
|
||||||
|
|
||||||
|
tag_name: ${{ env.tag }}
|
||||||
|
files: /opt/openwrt-sdk*/bin/packages/aarch64_generic/base/*
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user