https://github.com/elgohr/ecr-login-action
A Github Action which can be used to authenticate with AWS ECR
https://github.com/elgohr/ecr-login-action
actions aws container docker ecr github-actions publishing
Last synced: about 1 year ago
JSON representation
A Github Action which can be used to authenticate with AWS ECR
- Host: GitHub
- URL: https://github.com/elgohr/ecr-login-action
- Owner: elgohr
- License: mit
- Created: 2019-09-15T12:02:57.000Z (over 6 years ago)
- Default Branch: main
- Last Pushed: 2025-02-07T05:03:00.000Z (over 1 year ago)
- Last Synced: 2025-03-31T09:08:45.204Z (about 1 year ago)
- Topics: actions, aws, container, docker, ecr, github-actions, publishing
- Language: Shell
- Homepage:
- Size: 29.3 KB
- Stars: 39
- Watchers: 2
- Forks: 23
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ECR-Login-Action
[](https://github.com/elgohr/ecr-login-action/actions)
This Action for Docker logs into [AWS ECR](https://aws.amazon.com/de/ecr/) and gets the timely bound credentials for Docker.
## Usage
## Example pipeline
```yaml
name: Publish Docker
on: [ push ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Login to ECR
id: ecr
uses: elgohr/ecr-login-action@v3
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@v5
with:
name: myDocker/repository
username: ${{ steps.ecr.outputs.username }}
password: ${{ steps.ecr.outputs.password }}
registry: ${{ steps.ecr.outputs.registry }}
```
## Mandatory arguments
`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
## Outputs
`username` the username for logging in
`password` the password for logging in
`registry` the registry to log in to
`docker_name` the name of the docker image for building and pushing