fix: 合并 lint 到 build workflow - 顺序执行,只运行1个任务
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
name: Build Docker Image
|
name: Build Docker Image
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: build-docker
|
group: ci
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
@@ -16,8 +16,23 @@ on:
|
|||||||
default: 'latest'
|
default: 'latest'
|
||||||
|
|
||||||
jobs:
|
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:
|
build:
|
||||||
name: Build Docker Image
|
name: Build Docker Image
|
||||||
|
needs: lint
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
@@ -51,11 +66,11 @@ jobs:
|
|||||||
|
|
||||||
- name: Save Docker image
|
- name: Save Docker image
|
||||||
run: |
|
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
|
- name: Upload artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: next-terminal-docker-${{ steps.version.outputs.VERSION }}
|
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
|
retention-days: 7
|
||||||
|
|||||||
@@ -5,14 +5,13 @@ concurrency:
|
|||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- v*
|
- v*
|
||||||
branches:
|
branches:
|
||||||
- master
|
|
||||||
- be-*
|
- be-*
|
||||||
- dev
|
- dev
|
||||||
pull_request:
|
|
||||||
jobs:
|
jobs:
|
||||||
golangci:
|
golangci:
|
||||||
name: lint
|
name: lint
|
||||||
|
|||||||
Reference in New Issue
Block a user