File tree Expand file tree Collapse file tree 5 files changed +63
-8
lines changed Expand file tree Collapse file tree 5 files changed +63
-8
lines changed Original file line number Diff line number Diff line change 21
21
run : |
22
22
go install golang.org/x/lint/golint@latest
23
23
- name : Checkout code
24
- uses : actions/checkout@v3
24
+ uses : actions/checkout@v4
25
25
- name : Check Formatting
26
26
run : |
27
27
if [ "$(gofmt -s -l . | wc -l)" -gt 0 ]; then
Original file line number Diff line number Diff line change 15
15
with :
16
16
go-version : ' 1.21'
17
17
- name : Checkout code
18
- uses : actions/checkout@v3
18
+ uses : actions/checkout@v4
19
19
with :
20
20
fetch-depth : 0
21
21
- name : Build Project binaries
31
31
tag : ${{ github.ref }}
32
32
overwrite : true
33
33
file_glob : true
34
+
35
+ docker_build :
36
+ runs-on : ubuntu-22.04
37
+ name : Docker Build
38
+
39
+ steps :
40
+ - uses : actions/checkout@v4
41
+ with :
42
+ fetch-depth : 0
43
+
44
+ - name : Generate image tags
45
+ shell : bash
46
+ run : echo "tags=quay.io/rebuy/aws-nuke:${GITHUB_REF#refs/tags/},docker.io/rebuy/aws-nuke:${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
47
+ id : generate_tags
48
+
49
+ - name : Set up QEMU
50
+ id : qemu
51
+ uses : docker/setup-qemu-action@v2
52
+ with :
53
+ platforms : arm64
54
+
55
+ - name : Set up Docker Buildx
56
+ uses : docker/setup-buildx-action@v2
57
+ with :
58
+ install : true
59
+
60
+ - name : Login to Docker Hub
61
+ uses : docker/login-action@v2
62
+ with :
63
+ username : ${{ secrets.DOCKER_USERNAME }}
64
+ password : ${{ secrets.DOCKER_PASSWORD }}
65
+
66
+ - name : Login to Quay.io
67
+ uses : docker/login-action@v2
68
+ with :
69
+ registry : quay.io
70
+ username : ${{ secrets.QUAY_USERNAME }}
71
+ password : ${{ secrets.QUAY_PASSWORD }}
72
+
73
+ - name : Build and push
74
+ uses : docker/build-push-action@v3
75
+ with :
76
+ context : .
77
+ push : true
78
+ tags : ${{ steps.generate_tags.outputs.tags }}
79
+ platforms : linux/amd64,linux/arm64
Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ module github.com/rebuy-de/aws-nuke/v2
3
3
go 1.21
4
4
5
5
require (
6
- github.com/aws/aws-sdk-go v1.44.328
6
+ github.com/aws/aws-sdk-go v1.45.26
7
7
github.com/fatih/color v1.15.0
8
8
github.com/golang/mock v1.6.0
9
9
github.com/google/uuid v1.3.1
@@ -13,7 +13,7 @@ require (
13
13
github.com/sirupsen/logrus v1.9.3
14
14
github.com/spf13/cobra v1.7.0
15
15
github.com/stretchr/testify v1.8.4
16
- golang.org/x/sync v0.3 .0
16
+ golang.org/x/sync v0.4 .0
17
17
gopkg.in/yaml.v3 v3.0.1
18
18
)
19
19
Original file line number Diff line number Diff line change 1
- github.com/aws/aws-sdk-go v1.44.328 h1:WBwlf8ym9SDQ/GTIBO9eXyvwappKJyOetWJKl4mT7ZU =
2
- github.com/aws/aws-sdk-go v1.44.328 /go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI =
1
+ github.com/aws/aws-sdk-go v1.45.26 h1:PJ2NJNY5N/yeobLYe1Y+xLdavBi67ZI8gvph6ftwVCg =
2
+ github.com/aws/aws-sdk-go v1.45.26 /go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI =
3
3
github.com/cpuguy83/go-md2man/v2 v2.0.2 /go.mod h1:tgQtvFlXSQOSOSIRvRPT7W67SCa46tRHOmNcaadrF8o =
4
4
github.com/creack/pty v1.1.9 /go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E =
5
5
github.com/davecgh/go-spew v1.1.0 /go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38 =
@@ -75,8 +75,8 @@ golang.org/x/net v0.8.0/go.mod h1:QVkue5JL9kW//ek3r6jTKnTFis1tRmNAW2P1shuFdJc=
75
75
golang.org/x/sync v0.0.0-20190423024810-112230192c58 /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
76
76
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
77
77
golang.org/x/sync v0.0.0-20220722155255-886fb9371eb4 /go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM =
78
- golang.org/x/sync v0.3 .0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E =
79
- golang.org/x/sync v0.3 .0 /go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y =
78
+ golang.org/x/sync v0.4 .0 h1:zxkM55ReGkDlKSM+Fu41A+zmbZuaPVbGMzvvdUPznYQ =
79
+ golang.org/x/sync v0.4 .0 /go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y =
80
80
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33 /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
81
81
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a /go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY =
82
82
golang.org/x/sys v0.0.0-20190412213103-97732733099d /go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs =
Original file line number Diff line number Diff line change 1
1
package resources
2
2
3
3
import (
4
+ "fmt"
5
+ "strings"
4
6
"time"
5
7
6
8
"github.com/aws/aws-sdk-go/aws/session"
@@ -54,6 +56,13 @@ func ListOSPackages(sess *session.Session) ([]Resource, error) {
54
56
return resources , nil
55
57
}
56
58
59
+ func (o * OSPackage ) Filter () error {
60
+ if strings .HasPrefix (* o .packageID , "G" ) {
61
+ return fmt .Errorf ("cannot delete default opensearch packages" )
62
+ }
63
+ return nil
64
+ }
65
+
57
66
func (o * OSPackage ) Remove () error {
58
67
_ , err := o .svc .DeletePackage (& opensearchservice.DeletePackageInput {
59
68
PackageID : o .packageID ,
You can’t perform that action at this time.
0 commit comments