43 lines
1.7 KiB
YAML
43 lines
1.7 KiB
YAML
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' | jq -sRr @uri)" >> $GITHUB_ENV
|
|
echo "tag=$(date '+%Y-%m-%d')" >> $GITHUB_ENV
|
|
- name: 发布
|
|
uses: softprops/action-gh-release@v1
|
|
with:
|
|
token: ${{ secrets.c8 }}
|
|
body: |
|
|
> ### 
|
|
|
|
二进制程序下载地址:[caddy](https://github.com/lmq8267/caddy/releases)
|
|
|
|
tag_name: ${{ env.tag }}
|
|
files: /opt/openwrt-sdk*/bin/packages/aarch64_generic/base/*
|
|
|