0
0
mirror of https://github.com/thegeeklab/wp-docker-buildx.git synced 2024-11-10 03:30:40 +00:00

Merge remote-tracking branch 'benwilson512/master'

This commit is contained in:
Michael J. Schultz 2019-08-15 12:08:48 -05:00
commit 7b060dd935
No known key found for this signature in database
GPG Key ID: 979BD6F7C7C9F90E

View File

@ -21,6 +21,7 @@ const defaultRegion = "us-east-1"
func main() {
var (
repo = getenv("PLUGIN_REPO")
registry = getenv("PLUGIN_REGISTRY")
region = getenv("PLUGIN_REGION", "ECR_REGION", "AWS_REGION")
key = getenv("PLUGIN_ACCESS_KEY", "ECR_ACCESS_KEY", "AWS_ACCESS_KEY_ID")
secret = getenv("PLUGIN_SECRET_KEY", "ECR_SECRET_KEY", "AWS_SECRET_ACCESS_KEY")
@ -48,7 +49,12 @@ func main() {
}
svc := ecr.New(sess)
username, password, registry, err := getAuthInfo(svc)
username, password, defaultRegistry, err := getAuthInfo(svc)
if registry == "" {
registry = defaultRegistry
}
if err != nil {
log.Fatal(fmt.Sprintf("error getting ECR auth: %v", err))
}