Skip to content

Commit

Permalink
Use proper GitHub Action for logging into public ECR (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdeme authored Mar 28, 2023
1 parent 273b2a2 commit cbc3ce2
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions .github/workflows/publish/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,23 +31,17 @@ inputs:
runs:
using: composite
steps:
- name: Install the latest AWS CLI
shell: sh
run: |
apk add --no-cache python3 py3-pip
pip3 install --upgrade pip
pip3 install awscli
- name: Configure AWS credentials
- name: Configure AWS credentials for public ECR
uses: aws-actions/configure-aws-credentials@v2
with:
aws-region: us-east-1
role-to-assume: ${{ inputs.aws_role_to_assume }}
role-duration-seconds: 900

- name: Log in to Amazon public ECR
shell: sh
run: aws ecr-public get-login-password --region us-east-1 | docker login --username AWS --password-stdin public.ecr.aws
- name: Login to Amazon ECR Public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public

- name: Log in to GitHub registry
uses: docker/login-action@v2
Expand Down

0 comments on commit cbc3ce2

Please sign in to comment.