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
Solomon Hykes ce663ca2ba stdlib: aws/ecr: simplify
Signed-off-by: Solomon Hykes <solomon@dagger.io>
2021-06-09 17:22:53 +02:00

31 lines
426 B
CUE

package ecr
import (
"dagger.io/aws"
"dagger.io/os"
)
// Convert AWS credentials to Docker Registry credentials for ECR
#Credentials: {
// AWS Config
config: aws.#Config
// ECR credentials
username: "AWS"
ctr: os.#Container & {
image: aws.#CLI & {
"config": config
}
always: true
command: "aws ecr get-login-password > /out"
}
secret: {
os.#File & {
from: ctr
path: "/out"
}
}.read.data
}