2025-02-10 14:02:31 +08:00

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: |
> ### ![](https://img.shields.io/badge/%E7%BC%96%E8%AF%91%E6%97%B6%E9%97%B4-${{ env.build_time }}-8267?logo=github&labelColor=%E9%A1%BB)![](https://img.shields.io/github/downloads/${{ github.repository }}/${{ env.tag }}/total?label=%E4%B8%8B%E8%BD%BD%E6%AC%A1%E6%95%B0&logo=github)
二进制程序下载地址:[caddy](https://github.com/lmq8267/caddy/releases)
tag_name: ${{ env.tag }}
files: /opt/openwrt-sdk*/bin/packages/aarch64_generic/base/*