Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: output registry URI if single registry ID is provided as input #50

Merged
merged 3 commits into from
May 27, 2020

Conversation

clareliguori
Copy link
Member

Related to #48,

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@clareliguori clareliguori requested a review from a team May 25, 2020 20:47
@allisaurus allisaurus self-assigned this May 26, 2020
@@ -85,6 +85,37 @@ describe('Login to ECR', () => {
expect.anything());
});

test('outputs the registry ID if a single registry is provided in the input', async () => {
core.getInput = jest.fn().mockReturnValueOnce('111111111111');
Copy link
Contributor

@allisaurus allisaurus May 26, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should the mocked return value be registries: { with: [1111111111] } ?
EDIT: ugh I realize this was backwards; but the below comment saw what I was getting at :P

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you mean to mock the configuration:

      - name: Login to Amazon ECR
        id: login-ecr
        uses: aws-actions/amazon-ecr-login@v1
        with:
          registries: 1111111111

The GH actions toolkit takes care of parsing the config, and then the action just does core.getInput('registries')

@allisaurus
Copy link
Contributor

allisaurus commented May 27, 2020

I used this update with the registries field configured as in #48 and am still seeing a failure on the build/tag/push step.ECR_REGISTRY appears blank, despite referencing the output of the login-ecr step.

Is it possible that setting authTokenRequest.registryIds results in a response that would cause this check to not work?

@clareliguori
Copy link
Member Author

clareliguori commented May 27, 2020

@allisaurus ah, looks like my branch's changes aren't packaged into dist folder, so your action isn't running the change.
Update: Pushed a new commit to my branch after running packaging, so you can re-try your action workflow now.

@allisaurus
Copy link
Contributor

Ah ha! That did it, it's working no problem now. :shipit:

@mergify mergify bot merged commit cfd96f4 into aws-actions:master May 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants