fix: 合并 lint 到 build workflow - 顺序执行,只运行1个任务
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user