feat(自动构建): 构建OFDGo WebUI镜像
build.yaml / build (push) Successful in 44s

This commit is contained in:
2026-07-03 20:29:46 +08:00
parent bb2ae9da86
commit 691e722226
3 changed files with 51 additions and 0 deletions
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
set -e
export TZ=Asia/Shanghai
GOOS=js GOARCH=wasm CGO_ENABLED=0 go build -o assets/webui/ofdgo.wasm -trimpath -ldflags "-s -w -buildid=" ./cmd/webui/wasm.go
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o main -trimpath -ldflags "-s -w -buildid=" ./cmd/webui/webui.go
+32
View File
@@ -0,0 +1,32 @@
on: [push, workflow_dispatch]
jobs:
build:
runs-on: cn
steps:
- name: checkout
uses: actions/checkout@v6
- name: docker goenv
uses: docker://ccr.ccs.tencentyun.com/xiaoqidun/goenv:latest
with:
args: bash .gitea/workflows/build.sh
- name: docker setup
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
"env.http_proxy=${{ env.HTTP_PROXY }}"
"env.https_proxy=${{ env.HTTPS_PROXY }}"
"env.no_proxy=${{ env.NO_PROXY }}"
- name: docker login
uses: docker/login-action@v3
with:
registry: ccr.ccs.tencentyun.com
username: ${{ secrets.docker_username }}
password: ${{ secrets.docker_password }}
- name: docker build
uses: docker/build-push-action@v6
with:
context: .
push: true
provenance: false
tags: |
ccr.ccs.tencentyun.com/xiaoqidun/ofdgo:latest