mirror of
https://github.com/xiaoqidun/ofdgo.git
synced 2026-08-30 12:12:40 +08:00
This commit is contained in:
@@ -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
|
||||
@@ -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
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
# 基础镜像
|
||||
FROM alpine:3.24.1
|
||||
|
||||
# 作者信息
|
||||
LABEL authors="肖其顿 (XIAO QI DUN)"
|
||||
|
||||
# 工作路径
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# 复制程序
|
||||
COPY main ./main
|
||||
|
||||
# 启动命令
|
||||
ENTRYPOINT [ "/usr/src/app/main","-listen",":80"]
|
||||
Reference in New Issue
Block a user