File tree 4 files changed +106
-13
lines changed
4 files changed +106
-13
lines changed Original file line number Diff line number Diff line change
1
+ name : Release
2
+
3
+ on :
4
+ push :
5
+ tags :
6
+ - " *"
7
+
8
+ permissions :
9
+ contents : write
10
+
11
+ jobs :
12
+ Release :
13
+ runs-on : ubuntu-latest
14
+ steps :
15
+ - name : Checkout
16
+ uses : actions/checkout@v4
17
+ with :
18
+ fetch-depth : 0
19
+
20
+ - name : Set up Go
21
+ uses : actions/setup-go@v5
22
+ with :
23
+ go-version : stable
24
+
25
+ - name : Test
26
+ run : make test
27
+
28
+ - name : Set up QEMU
29
+ uses : docker/setup-qemu-action@v3
30
+
31
+ - name : Login to Quay.io
32
+ uses : docker/login-action@v3
33
+ with :
34
+ registry : quay.io
35
+ username : ${{ secrets.QUAY_USERNAME }}
36
+ password : ${{ secrets.QUAY_PASSWORD }}
37
+
38
+ - name : Run GoReleaser
39
+ uses : goreleaser/goreleaser-action@v5
40
+ with :
41
+ distribution : goreleaser
42
+ version : " ~> v1"
43
+ args : release --clean
44
+ env :
45
+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
1
+ name : Test
2
+
3
+ on :
4
+ pull_request :
5
+ branches :
6
+ - ' *'
7
+
8
+ jobs :
9
+ Test :
10
+ runs-on : ubuntu-latest
11
+ steps :
12
+ - name : Checkout
13
+ uses : actions/checkout@master
14
+ with :
15
+ fetch-depth : 0
16
+
17
+ - name : Set up Go
18
+ uses : actions/setup-go@v5
19
+ with :
20
+ go-version : stable
21
+
22
+ - name : Test
23
+ run : make test
Original file line number Diff line number Diff line change 5
5
* .dylib
6
6
bin /
7
7
.idea /
8
+ dist /
8
9
# Test binary, build with `go test -c`
9
10
* .test
10
11
* .iml
Original file line number Diff line number Diff line change 3
3
project_name : kube-cleanup-operator
4
4
5
5
builds :
6
- - binary : kube-cleanup-operator
6
+ - id : build
7
+ binary : kube-cleanup-operator
7
8
main : ./cmd/main.go
8
9
env :
9
10
- CGO_ENABLED=0
10
11
goos :
11
- - darwin
12
12
- linux
13
13
goarch :
14
14
- amd64
15
15
- arm64
16
- - arm7
17
- ignore :
18
- - goos : darwin
19
- goarch : arm7
20
- - goos : darwin
21
- goarch : arm64
22
16
23
17
release :
24
18
github :
@@ -27,11 +21,41 @@ release:
27
21
prerelease : true
28
22
29
23
dockers :
30
- - dockerfile : Dockerfile.releaser
31
- binaries :
32
- - kube-cleanup-operator
24
+ - id : release-amd64
25
+ dockerfile : Dockerfile.releaser
26
+ use : buildx
33
27
goos : linux
34
28
goarch : amd64
29
+ ids :
30
+ - build
31
+ build_flag_templates :
32
+ - " --pull"
33
+ - " --platform=linux/amd64"
35
34
image_templates :
36
- - ' quay.io/lwolf/kube-cleanup-operator:{{ .Tag }}'
37
- - ' quay.io/lwolf/kube-cleanup-operator:latest'
35
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-amd64"
36
+
37
+ - id : release-arm64
38
+ dockerfile : Dockerfile.releaser
39
+ use : buildx
40
+ goos : linux
41
+ goarch : arm64
42
+ ids :
43
+ - build
44
+ build_flag_templates :
45
+ - " --pull"
46
+ - " --platform=linux/arm64"
47
+ image_templates :
48
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-arm64"
49
+
50
+ docker_manifests :
51
+ - id : manifest-release
52
+ name_template : " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}"
53
+ image_templates :
54
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-amd64"
55
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-arm64"
56
+
57
+ - id : manifest-latest
58
+ name_template : " quay.io/lwolf/kube-cleanup-operator:latest"
59
+ image_templates :
60
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-amd64"
61
+ - " quay.io/lwolf/kube-cleanup-operator:{{ .Version }}-arm64"
You can’t perform that action at this time.
0 commit comments