From c72caf4f756f21345ef4a034fd5fbbef7be34dfe Mon Sep 17 00:00:00 2001 From: admin Date: Wed, 22 Apr 2026 18:54:14 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20workflow=20=E4=BD=BF?= =?UTF-8?q?=E7=94=A8=E5=AE=B9=E5=99=A8=E8=BF=90=E8=A1=8C=20lint=20?= =?UTF-8?q?=E5=92=8C=20build-web=EF=BC=8C=E5=88=86=E7=A6=BB=20Docker=20?= =?UTF-8?q?=E6=9E=84=E5=BB=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docker-image.yml | 38 +++++++++++++++++------- 1 file changed, 27 insertions(+), 11 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index c94b38982..907006db6 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -19,11 +19,10 @@ jobs: lint: name: Go Lint runs-on: act-runner-4c6g + container: + image: golang:1.22 steps: - uses: actions/checkout@v4 - - uses: actions/setup-go@v5 - with: - go-version: '1.22' - name: Install golangci-lint run: | curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.59.1 @@ -31,19 +30,16 @@ jobs: run: | $(go env GOPATH)/bin/golangci-lint run --timeout=5m ./server/... - build: - name: Build Docker Image + build-web: + name: Build Web needs: lint - runs-on: act-runner + runs-on: act-runner-4c6g + container: + image: node:20 steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Node - uses: actions/setup-node@v4 - with: - node-version: '20' - - name: Build web run: | cd web @@ -53,6 +49,26 @@ jobs: mkdir -p ../server/resource/build cp -r dist/* ../server/resource/build/ + - name: Upload build artifacts + uses: actions/upload-artifact@v4 + with: + name: web-build + path: server/resource/build + + build-docker: + name: Build Docker Image + needs: build-web + runs-on: act-runner-4c6g + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Download build artifacts + uses: actions/download-artifact@v4 + with: + name: web-build + path: server/resource/build + - name: Get version id: version run: |