14
14
- ' macos-15'
15
15
Binary :
16
16
description : ' Build binary'
17
- required : true
18
17
default : false
19
18
type : boolean
20
19
Golangci :
21
20
description : ' Golangci linter check'
22
- required : true
23
21
default : true
24
22
type : boolean
25
23
Gocritic :
26
24
description : ' Critic linter check'
27
- required : true
28
25
default : true
29
26
type : boolean
30
27
Gosec :
31
28
description : ' Security linter check'
32
- required : true
33
29
default : true
34
30
type : boolean
35
31
TMUX :
36
32
description : ' Interface testing'
37
- required : true
38
33
default : true
39
34
type : boolean
40
35
Timeout :
@@ -70,19 +65,19 @@ jobs:
70
65
go build -v ./...
71
66
72
67
- name : Golangci linter check
73
- if : ${{ github.event.inputs.Golangci }}
68
+ if : ${{ github.event.inputs.Golangci == 'true' }}
74
69
run : |
75
70
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
76
71
golangci-lint run ./...
77
72
78
73
- name : Critic linter check
79
- if : ${{ github.event.inputs.Gocritic }}
74
+ if : ${{ github.event.inputs.Gocritic == 'true' }}
80
75
run : |
81
76
go install github.com/go-critic/go-critic/cmd/gocritic@latest
82
77
gocritic check -enableAll ./...
83
78
84
79
- name : Security linter check
85
- if : ${{ github.event.inputs.Gosec }}
80
+ if : ${{ github.event.inputs.Gosec == 'true' }}
86
81
run : |
87
82
go install github.com/securego/gosec/v2/cmd/gosec@latest
88
83
gosec -severity=high ./...
@@ -96,14 +91,14 @@ jobs:
96
91
run : docker run -d --name pinguem -p 8085:8085 -p 3005:3005 lifailon/pinguem:latest
97
92
98
93
- name : Interface testing
99
- if : ${{ github.event.inputs.TMUX }}
94
+ if : ${{ github.event.inputs.TMUX == 'true' }}
100
95
run : |
101
96
tmux -V
102
97
chmod +x test.sh
103
98
bash test.sh ${{ github.event.inputs.Timeout }} true
104
99
105
100
- name : Build binaries
106
- if : ${{ github.event.inputs.Binary }}
101
+ if : ${{ github.event.inputs.Binary == 'true' }}
107
102
run : |
108
103
version=$(cat main.go | grep Version: | awk -F '"' '{print $4}')
109
104
echo "Get version from main.go: $version"
@@ -120,7 +115,7 @@ jobs:
120
115
echo "ARTIFACT_NAME=lazyjournal-$(date +'%d.%m.%Y')" >> $GITHUB_ENV
121
116
122
117
- name : Upload binaries
123
- if : ${{ github.event.inputs.Binary }}
118
+ if : ${{ github.event.inputs.Binary == 'true' }}
124
119
uses : actions/upload-artifact@v4
125
120
with :
126
121
name : ${{ env.ARTIFACT_NAME }}
0 commit comments