From 5b7ff7204d5113ee36ac9f44aec81bfeb52cf3fa Mon Sep 17 00:00:00 2001 From: xiaoqidun Date: Wed, 26 Nov 2025 17:19:50 +0800 Subject: [PATCH] =?UTF-8?q?feat(=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC):=20?= =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=9E=84=E5=BB=BA=E8=84=9A=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .drone.yml | 32 ------------------------------ .gitea/workflows/build.yaml | 39 +++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 32 deletions(-) delete mode 100644 .drone.yml create mode 100644 .gitea/workflows/build.yaml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index dc88c31..0000000 --- a/.drone.yml +++ /dev/null @@ -1,32 +0,0 @@ -kind: pipeline -name: default -node: - region: cn -steps: - - name: build - pull: if-not-exists - image: ccr.ccs.tencentyun.com/xiaoqidun/goenv - commands: - - GOAMD64=v3 CGO_ENABLED=0 go build -o gocos -trimpath -ldflags "-s -w -buildid=" gocos.go - - name: docker-cn - pull: if-not-exists - image: plugins/docker - settings: - repo: ccr.ccs.tencentyun.com/xiaoqidun/gocos - registry: ccr.ccs.tencentyun.com - username: - from_secret: docker_username - password: - from_secret: docker_password - dockerfile: Dockerfile - - name: docker-hk - pull: if-not-exists - image: plugins/docker - settings: - repo: hkccr.ccs.tencentyun.com/xiaoqidun/gocos - registry: hkccr.ccs.tencentyun.com - username: - from_secret: docker_username - password: - from_secret: docker_password - dockerfile: Dockerfile \ No newline at end of file diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..d104f67 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,39 @@ +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: sh -c "GOAMD64=v3 CGO_ENABLED=0 go build -o gocos -trimpath -ldflags '-s -w -buildid=' gocos.go" + - 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 login + uses: docker/login-action@v3 + with: + registry: hkccr.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/gocos:latest + hkccr.ccs.tencentyun.com/xiaoqidun/gocos:latest \ No newline at end of file