aws-actions/amazon-ecr-login

If registries number start from 0, then 0 is truncated

cojack opened this issue · 1 comments

Hi,
I have the error:

Error: Invalid parameter at 'registryIds' failed to satisfy constraint: 'Member must satisfy constraint: [Member must satisfy regular expression pattern: [0-9]{12}]'

Funny thing is that, that my other builds are working like a charm with the same configuration, the difference is that number, and I've checked it, it satisfies the regular expression of [0-9]{12} but still, it breaks, any advice?

There is a bug, if your registries number start from 0, then it's removed:

##[debug]Evaluating condition for step: 'Login to Amazon ECR'
##[debug]Evaluating: success()
##[debug]Evaluating success:
##[debug]=> true
##[debug]Result: true
##[debug]Starting: Login to Amazon ECR
##[debug]Register post job cleanup for action: aws-actions/amazon-ecr-login@v1
##[debug]Loading inputs
##[debug]Loading env
Run aws-actions/amazon-ecr-login@v1
##[debug]Requesting auth token for 1 registries:
##[debug]  '61725161810' <--- here should be zero at the beginning 
Error: Invalid parameter at 'registryIds' failed to satisfy constraint: 'Member must satisfy constraint: [Member must satisfy regular expression pattern: [0-9]{12}]'
##[debug]Node Action run completed with exit code 1
##[debug]Finishing: Login to Amazon ECR