File tree Expand file tree Collapse file tree 2 files changed +64
-5
lines changed Expand file tree Collapse file tree 2 files changed +64
-5
lines changed Original file line number Diff line number Diff line change @@ -3,8 +3,8 @@ name: Docker Image CI
3
3
on :
4
4
push :
5
5
branches : [ "main" ]
6
- pull_request :
7
- branches : [ "main" ]
6
+ tags :
7
+ - " v* "
8
8
9
9
jobs :
10
10
docker-hub :
29
29
context : .
30
30
file : ./Dockerfile
31
31
push : true
32
- tags : xcsoft/busuanzi:latest
32
+ tags : xcsoft/busuanzi:${{ github.ref }}
33
33
34
34
github-docker :
35
35
runs-on : ubuntu-latest
54
54
context : .
55
55
file : ./Dockerfile
56
56
push : true
57
- tags : ghcr.io/soxft/busuanzi:latest
57
+ tags : ghcr.io/soxft/busuanzi:${{ github.ref }}
58
+
59
+ build :
60
+ runs-on : ubuntu-latest
61
+ steps :
62
+ - name : Checkout
63
+ uses : actions/checkout@v4
64
+
65
+ - name : Set up Go
66
+ uses : actions/setup-go@v2
67
+ with :
68
+ go-version : 1.21
69
+
70
+ - name : Build
71
+ run : |
72
+ GOOS=linux GOARCH=amd64 go build -o busuanzi-linux-amd64
73
+ GOOS=linux GOARCH=arm64 go build -o busuanzi-linux-arm64
74
+ GOOS=darwin GOARCH=amd64 go build -o busuanzi-darwin-amd64
75
+ GOOS=darwin GOARCH=arm64 go build -o busuanzi-darwin-arm64
76
+ GOOS=windows GOARCH=amd64 go build -o busuanzi-windows-amd64.exe
77
+ GOOS=windows GOARCH=arm64 go build -o busuanzi-windows-arm64.exe
78
+ GOOS=windows GOARCH=386 go build -o busuanzi-windows-386.exe
79
+
80
+ - name : Archive
81
+ uses : softprops/action-gh-release@v2
82
+ if : startsWith(github.ref, 'refs/tags/')
83
+ with :
84
+ files : |
85
+ busuanzi-linux-amd64
86
+ busuanzi-linux-arm64
87
+ busuanzi-darwin-amd64
88
+ busuanzi-darwin-arm64
89
+ busuanzi-windows-amd64.exe
90
+ busuanzi-windows-arm64.exe
91
+ busuanzi-windows-386.exe
92
+ token : ${{ secrets.GITHUB_TOKEN }}
93
+ release_name : ${{ github.ref }}
94
+ tag_name : ${{ github.ref }}
95
+ body : ${{ github.event.release.body }}
Original file line number Diff line number Diff line change 22
22
with :
23
23
context : .
24
24
file : ./Dockerfile
25
- push : false
25
+ push : false
26
+
27
+ build :
28
+ runs-on : ubuntu-latest
29
+ steps :
30
+ - name : Checkout
31
+ uses : actions/checkout@v4
32
+
33
+ - name : Set up Go
34
+ uses : actions/setup-go@v2
35
+ with :
36
+ go-version : 1.21
37
+
38
+ - name : Build
39
+ run : |
40
+ GOOS=linux GOARCH=amd64 go build -o busuanzi-linux-amd64
41
+ GOOS=linux GOARCH=arm64 go build -o busuanzi-linux-arm64
42
+ GOOS=darwin GOARCH=amd64 go build -o busuanzi-darwin-amd64
43
+ GOOS=darwin GOARCH=arm64 go build -o busuanzi-darwin-arm64
44
+ GOOS=windows GOARCH=amd64 go build -o busuanzi-windows-amd64.exe
45
+ GOOS=windows GOARCH=arm64 go build -o busuanzi-windows-arm64.exe
46
+ GOOS=windows GOARCH=386 go build -o busuanzi-windows-386.exe
You can’t perform that action at this time.
0 commit comments