Repository navigation
Conversation
registry-auth is parsed as YAML, so `ecr: false` (unquoted) is the boolean false, and `auth.ecr || 'auto'` turned it into 'auto'. For an ECR registry this runs the AWS SDK login with the given username and password as AWS access keys, instead of the plain docker login the user asked for. Only the quoted string "false" worked. Convert the value to a string and only default to 'auto' when it is missing or empty. Assisted-By: Claude Signed-off-by: breken-ai <312387581+breken-ai@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
registry-authis parsed as YAML. An unquotedecr: falseis therefore the booleanfalse, andgetAuthListmaps it withauth.ecr || 'auto', so it turns intoauto. For an ECR host,automeans the action uses the AWS SDK path,loginECR. That path treats the username and password as an AWS access key pair. A user who setecr: falseso that a token they got another way is used with a plaindocker logingets an AWS SDK auth failure instead:Only the quoted
ecr: "false"works today. Theecrinput does not have this problem, because it is always a string.Fix: convert the YAML value to a string. It falls back to
autoonly when it is missing or empty:String(auth.ecr ?? '') || 'auto'. Unquotedtruenow becomes the string'true'. Before, it was the booleantrue, which/true/i.testalready accepted, so its behavior does not change.Tests
getAuthList keeps registry-auth ecr: %s(context.test.ts): coversfalse,"false",true,autoand"".login uses standard login for an ECR registry with registry-auth ecr: false(docker.test.ts): checks thatgetRegistriesDatais not called and thatdocker login --username AWS <registry>runs.falsegivesReceived: "auto"and the login goes through the AWS SDK. With the fix, all 85 tests pass.yarn lintandtsc --noEmitpass.dist/is rebuilt withyarn build.AI disclosure: I found and fixed this with help from an AI assistant (Claude). I checked the change and the tests myself.
🤖 Generated with Claude Code