Skip to content

Commit 03e67c0

Browse files
committed
fix: actions
1 parent 97574ad commit 03e67c0

File tree

3 files changed

+16
-9
lines changed

3 files changed

+16
-9
lines changed

.github/workflows/docker.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
name: docker
22

33
on:
4-
push:
5-
branches:
6-
- "main"
4+
release:
5+
types: [published]
76

87
jobs:
98
docker:

.github/workflows/test.yml

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
name: test
22

3-
on:
4-
push:
3+
on: push
54

65
jobs:
7-
goreleaser:
6+
test:
87
runs-on: ubuntu-latest
98
steps:
109
- name: Checkout
@@ -14,4 +13,4 @@ jobs:
1413
with:
1514
go-version: "1.22"
1615
- name: Test
17-
run: ./script.sh test
16+
run: ./scripts.sh test

scripts.sh

+11-2
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,21 @@ build() {
1212
cd $root || exit 1
1313
}
1414

15+
gen() {
16+
go generate ./...
17+
}
18+
19+
test_go() {
20+
gen
21+
go test ./...
22+
}
23+
1524
case $1 in
1625
"test")
17-
go test ./...
26+
test_go
1827
;;
1928
"gen")
20-
go generate ./...
29+
gen
2130
;;
2231
"build")
2332
build

0 commit comments

Comments
 (0)