mirror of
https://github.com/gowvp/gb28181.git
synced 2026-04-22 23:17:19 +08:00
Add GitHub Actions workflow for release automation
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
name: Build on Release
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 10
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.25.4"
|
||||
|
||||
- name: Build Linux binaries
|
||||
run: make build/linux
|
||||
|
||||
- name: Prepare release assets
|
||||
run: |
|
||||
mv build/linux_amd64/bin linux_amd64
|
||||
mv build/linux_arm64/bin linux_arm64
|
||||
|
||||
- name: Upload release assets
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
linux_amd64
|
||||
linux_arm64
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -208,12 +208,11 @@ docker/build/zlm: build/clean build/linux
|
||||
@docker build --force-rm=true --push --platform linux/amd64,linux/arm64 -t registry.cn-shanghai.aliyuncs.com/ixugo/homenvr:latest -f Dockerfile_zlm .
|
||||
|
||||
docker/build/ai: build/clean build/linux
|
||||
@docker build --platform linux/amd64,linux/arm64 -t registry.cn-shanghai.aliyuncs.com/ixugo/homenvr:beta -f Dockerfile_ai .
|
||||
|
||||
@docker build --push --platform linux/amd64,linux/arm64 -t registry.cn-shanghai.aliyuncs.com/ixugo/homenvr:beta -f Dockerfile_ai .
|
||||
|
||||
# 发布融合镜像到镜像仓库
|
||||
docker/publish: build/clean build/linux
|
||||
@docker build --force-rm=true --push --platform linux/amd64,linux/arm64 -t registry.cn-shanghai.aliyuncs.com/ixugo/homenvr:latest -t $(IMAGE_NAME) -f Dockerfile_zlm .
|
||||
@docker build --force-rm=true --push --platform linux/amd64,linux/arm64 -t registry.cn-shanghai.aliyuncs.com/ixugo/homenvr:latest -t $(IMAGE_NAME) -f Dockerfile_ai .
|
||||
|
||||
# 构建 gowvp 独立镜像
|
||||
docker/build/gowvp: build/clean build/linux
|
||||
|
||||
Reference in New Issue
Block a user