From 1f8f839a1b7215e8834840e1bf8a393bb2572e17 Mon Sep 17 00:00:00 2001 From: admin Date: Mon, 20 Apr 2026 06:57:49 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E5=90=88=E5=B9=B6=20lint=20=E5=88=B0=20?= =?UTF-8?q?build=20workflow=20-=20=E9=A1=BA=E5=BA=8F=E6=89=A7=E8=A1=8C?= =?UTF-8?q?=EF=BC=8C=E5=8F=AA=E8=BF=90=E8=A1=8C1=E4=B8=AA=E4=BB=BB?= =?UTF-8?q?=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/build-docker-image.yml | 21 ++++++++++++++++++--- .github/workflows/golangci-lint.yml | 3 +-- 2 files changed, 19 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index f4e2a833f..2ec5be852 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -1,7 +1,7 @@ name: Build Docker Image concurrency: - group: build-docker + group: ci cancel-in-progress: true on: @@ -16,8 +16,23 @@ on: default: 'latest' jobs: + lint: + name: Go Lint + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version: '1.22' + - name: golangci-lint + uses: golangci/golangci-lint-action@v4 + with: + version: v1.59.1 + args: --timeout=5m + build: name: Build Docker Image + needs: lint runs-on: ubuntu-latest steps: - name: Checkout @@ -51,11 +66,11 @@ jobs: - name: Save Docker image run: | - docker save next-terminal:${{ steps.version.outputs.VERSION }} | gzip > next-terminal-${{ steps.version.outputs.VERSION }}.tar.gz + docker save next-terminal:${{ steps.version.outputs.VERSION}} | gzip > next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz - name: Upload artifact uses: actions/upload-artifact@v4 with: name: next-terminal-docker-${{ steps.version.outputs.VERSION }} - path: next-terminal-${{ steps.version.outputs.VERSION }}.tar.gz + path: next-terminal-${{ steps.version.outputs.VERSION}}.tar.gz retention-days: 7 diff --git a/.github/workflows/golangci-lint.yml b/.github/workflows/golangci-lint.yml index 27a509392..64166fb0b 100644 --- a/.github/workflows/golangci-lint.yml +++ b/.github/workflows/golangci-lint.yml @@ -5,14 +5,13 @@ concurrency: cancel-in-progress: true on: + pull_request: push: tags: - v* branches: - - master - be-* - dev - pull_request: jobs: golangci: name: lint