This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
dagger/stdlib/aws/ecr/ecr.cue

37 lines
535 B
CUE
Raw Normal View History

package ecr
import (
"dagger.io/dagger"
"dagger.io/aws"
)
// Credentials retriever for ECR
#Credentials: {
// AWS Config
config: aws.#Config
// Target is the ECR image
target: string
out: dagger.#Secret
// ECR credentials
credentials: dagger.#RegistryCredentials & {
username: "AWS"
secret: out
}
aws.#Script & {
"config": config
export: "/out"
code: """
aws ecr get-login-password > /out
"""
}
// Authentication for ECR Registries
auth: dagger.#RegistryAuth
auth: "\(target)": credentials
}