Skip to content
This repository has been archived by the owner on Nov 29, 2024. It is now read-only.

Commit

Permalink
fix(gha-build-ecr): use working login elsewhere
Browse files Browse the repository at this point in the history
  • Loading branch information
fernandoataoldotcom authored Oct 14, 2023
1 parent d49d7e6 commit 94e683d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/test-action-on-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:

- name: verify ecr
run: |
$(aws ecr get-login --region us-west-2 --no-include-email)
echo $(aws ecr get-login-password --region ${{ inputs.aws_default_region }}) \
| docker login --username AWS --password-stdin ${{ inputs.registry }}
docker pull $ECR_REGISTRY/$TEST_IMAGE_NAME:${{ github.sha }}
docker run $ECR_REGISTRY/$TEST_IMAGE_NAME:${{ github.sha }}
Expand Down
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ runs:
echo "${{ inputs.github_token }}" | docker login ${{ inputs.registry }} -u ${{ github.actor }} --password-stdin
;;
*".dkr.ecr."*)
ECR_PASSWORD=$(aws ecr get-login-password --region ${{ inputs.aws_default_region }})
echo $ECR_PASSWORD | docker login --username AWS --password-stdin ${{ inputs.registry }}
echo $(aws ecr get-login-password --region ${{ inputs.aws_default_region }}) \
| docker login --username AWS --password-stdin ${{ inputs.registry }}
;;
"docker.io")
echo "${{ inputs.dockerhub_password }}" | docker login -u "${{ inputs.dockerhub_username }}" --password-stdin
Expand Down

0 comments on commit 94e683d

Please sign in to comment.