This Action for Docker logs into AWS ECR and gets the timely bound credentials for Docker.
name: Publish Docker
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Login to ECR
id: ecr
uses: elgohr/ecr-login-action@master
with:
access_key: ${{ secrets.AWS_ACCESS_KEY }}
secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
region: ${{ secrets.AWS_REGION }}
- name: Publish to Registry
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: myDocker/repository
username: ${{ steps.ecr.outputs.username }}
password: ${{ steps.ecr.outputs.password }}
registry: ${{ steps.ecr.outputs.registry }}
access_key
is the AWS access key
secret_access_key
is the AWS secret access key
region
the region you would like to login to
username
the username for logging in
password
the password for logging in
registry
the registry to log in to