diff --git a/index.js b/index.js index 3e280d48..5521d595 100644 --- a/index.js +++ b/index.js @@ -64,6 +64,8 @@ async function run() { } const secretSuffix = replaceSpecialCharacters(registryUri) + core.setSecret(creds[0]) + core.setSecret(creds[1]) core.setOutput(`docker_username_${secretSuffix}`, creds[0]); core.setOutput(`docker_password_${secretSuffix}`, creds[1]); diff --git a/index.test.js b/index.test.js index 39ae8864..1fd66a9b 100644 --- a/index.test.js +++ b/index.test.js @@ -292,6 +292,10 @@ describe('Login to ECR', () => { }); await run(); + expect(core.setSecret).toHaveBeenNthCalledWith(1, 'hello'); + expect(core.setSecret).toHaveBeenNthCalledWith(2, 'world'); + expect(core.setSecret).toHaveBeenNthCalledWith(3, 'foo'); + expect(core.setSecret).toHaveBeenNthCalledWith(4, 'bar'); expect(core.setOutput).toHaveBeenNthCalledWith(1, 'docker_username_123456789012_dkr_ecr_aws_region_1_amazonaws_com', 'hello'); expect(core.setOutput).toHaveBeenNthCalledWith(2, 'docker_password_123456789012_dkr_ecr_aws_region_1_amazonaws_com', 'world'); expect(core.setOutput).toHaveBeenNthCalledWith(3, 'docker_username_111111111111_dkr_ecr_aws_region_1_amazonaws_com', 'foo');