fix: 合并 lint 到 build workflow - 顺序执行,只运行1个任务

This commit is contained in:
2026-04-20 06:57:49 +08:00
parent f52da71d87
commit 1f8f839a1b
2 changed files with 19 additions and 5 deletions
+18 -3
View File
@@ -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