-
Notifications
You must be signed in to change notification settings - Fork 39
57 lines (46 loc) · 1.27 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
on:
push:
branches:
- 'master'
paths:
- '**.go'
- 'go.mod'
- '**.yml'
name: ci
env:
GO111MODULE: on
jobs:
ci:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: '1.20'
cache: false
- name: Sort Imports
run: |
export PATH="$PATH:$GOPATH/bin"
go install github.com/incu6us/goimports-reviser@latest
pwd
find . -name "*.go" | xargs -I {} goimports-reviser -file-path {} -project-name "github.com/LagrangeDev/LagrangeGo"
- name: GolangCI-Lint
uses: golangci/golangci-lint-action@v6
with:
version: 'v1.61.0'
args: '--timeout 9999s'
only-new-issues: true
skip-save-cache: true
- name: commit back
if: github.repository_owner == 'LagrangeDev'
run: |
git config --local user.name 'github-actions[bot]'
git config --local user.email '41898282+github-actions[bot]@users.noreply.github.com'
git add .
git commit -m "ci(chore): Fix stylings"
git push