7009d01835
Signed-off-by: Sam Alba <sam.alba@gmail.com>
29 lines
371 B
CUE
29 lines
371 B
CUE
package ecr
|
|
|
|
import (
|
|
"dagger.io/dagger"
|
|
"dagger.io/aws"
|
|
)
|
|
|
|
// Credentials retriever for ECR
|
|
#Credentials: {
|
|
// AWS Config
|
|
config: aws.#Config
|
|
|
|
out: dagger.#Secret
|
|
|
|
// ECR credentials
|
|
username: "AWS"
|
|
|
|
secret: out @dagger(output)
|
|
|
|
aws.#Script & {
|
|
always: true
|
|
"config": config
|
|
export: "/out"
|
|
code: """
|
|
aws ecr get-login-password > /out
|
|
"""
|
|
}
|
|
}
|