cli/pkg/cmd/attestation/attestation.go
Zach Steindler f972050dc9
gh attestation trusted-root subcommand (#9206)
Adds `trusted-root` subcommand to `gh attestation`.

For use in upcoming docs on how to do offline verification with artifact
attestations.

---------

Signed-off-by: Zach Steindler <steiza@github.com>
Co-authored-by: Fredrik Skogman <kommendorkapten@github.com>
2024-07-01 11:50:39 -04:00

30 lines
839 B
Go

package attestation
import (
"github.com/MakeNowJust/heredoc"
"github.com/cli/cli/v2/pkg/cmd/attestation/download"
"github.com/cli/cli/v2/pkg/cmd/attestation/inspect"
"github.com/cli/cli/v2/pkg/cmd/attestation/trustedroot"
"github.com/cli/cli/v2/pkg/cmd/attestation/verify"
"github.com/cli/cli/v2/pkg/cmdutil"
"github.com/spf13/cobra"
)
func NewCmdAttestation(f *cmdutil.Factory) *cobra.Command {
root := &cobra.Command{
Use: "attestation [subcommand]",
Short: "Work with artifact attestations",
Aliases: []string{"at"},
Long: heredoc.Doc(`
Download and verify artifact attestations.
`),
}
root.AddCommand(download.NewDownloadCmd(f, nil))
root.AddCommand(inspect.NewInspectCmd(f, nil))
root.AddCommand(verify.NewVerifyCmd(f, nil))
root.AddCommand(trustedroot.NewTrustedRootCmd(f, nil))
return root
}