diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 301c2d3..ac8e8d4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,7 +1,6 @@ name: goreleaser on: - pull_request: push: tags: - "*" diff --git a/Makefile b/Makefile index 2ea1311..24d334a 100644 --- a/Makefile +++ b/Makefile @@ -43,8 +43,8 @@ build: @echo "Build complete" dev: build - @echo "Running ${PROJECT_NAME}..." - ${TARGET_PATH}/${PROJECT_NAME}.${GOOS}.${GOARCH} + @echo "Running ${PROJECT_NAME} with arguments: $(ARGS)..." + ${TARGET_PATH}/${PROJECT_NAME}.${GOOS}.${GOARCH} $(ARGS) clean: @echo "Cleaning up..." diff --git a/cmd/root.go b/cmd/root.go index a434025..1737fe7 100644 --- a/cmd/root.go +++ b/cmd/root.go @@ -39,8 +39,8 @@ var rootCmd = &cobra.Command{ newConfig := config.Initialize() config.SetAwsProfile(awsProfile) - // p := tea.NewProgram(tui.New(newConfig), tea.WithAltScreen()) - p := tea.NewProgram(tui.New(newConfig)) + p := tea.NewProgram(tui.New(newConfig), tea.WithAltScreen()) + // p := tea.NewProgram(tui.New(newConfig)) if _, err := p.Run(); err != nil { log.Fatal(err) } diff --git a/internal/aws/ecr/ecr.go b/internal/aws/ecr/ecr.go index 0518ae4..4fbf55e 100644 --- a/internal/aws/ecr/ecr.go +++ b/internal/aws/ecr/ecr.go @@ -15,7 +15,11 @@ func DescribeRepositories() ([]types.Repository, error) { if err := setupClient(); err != nil { return nil, err } - repositories, err := client.DescribeRepositories(context.TODO(), &ecr.DescribeRepositoriesInput{}) + + maxResults := int32(1000) + repositories, err := client.DescribeRepositories(context.TODO(), &ecr.DescribeRepositoriesInput{ + MaxResults: &maxResults, + }) if err != nil { return nil, err } @@ -36,18 +40,16 @@ func DescribeImages(repositoryName *string) ([]types.ImageDetail, error) { } images, err := client.DescribeImages(context.TODO(), &ecr.DescribeImagesInput{ RepositoryName: repositoryName, + Filter: &types.DescribeImagesFilter{ + TagStatus: types.TagStatusTagged, + }, }) if err != nil { return nil, err } var result []types.ImageDetail - for _, image := range images.ImageDetails { - // list images with tag only - if len(image.ImageTags) > 0 { - result = append(result, image) - } - } + result = append(result, images.ImageDetails...) // sort by ImagePushedAt sort.Slice(result, func(i, j int) bool { diff --git a/tui/aws/ecr/view.go b/tui/aws/ecr/view.go index 163ab86..9db99c6 100644 --- a/tui/aws/ecr/view.go +++ b/tui/aws/ecr/view.go @@ -11,7 +11,7 @@ import ( func (m Model) View() string { var s string - s += "\n" + m.textinput.View() + "\n" + s += "\n" + m.textinput.View() s += m.loadingRender() s += m.tableRender() @@ -77,6 +77,7 @@ func (m Model) footerRender() string { s += " " + TabSelectedStyle.Render("") } + s += "\n" + " " + HelpStyle.Render("Max items: 1000") s += "\n\n" return s