File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1010 branches : [master]
1111
1212jobs :
13- push_to_registry :
14- name : Push Docker image to Docker Hub
13+ push_to_registries :
14+ name : Push Docker image to Docker Hub, ECR Public, GitHub Container Registry
1515 runs-on : ubuntu-latest
1616 steps :
1717 - name : Check out the repo
@@ -29,11 +29,30 @@ jobs:
2929 username : ${{ secrets.DOCKER_HUB_USERNAME }}
3030 password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
3131
32+ - name : Login to ECR Public
33+ uses : docker/login-action@v1
34+ with :
35+ registry : public.ecr.aws
36+ username : ${{ secrets.AWS_ACCESS_KEY_ID }}
37+ password : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
38+ env :
39+ AWS_REGION : us-east-1
40+
41+ - name : Login to GitHub Container Registry
42+ uses : docker/login-action@v1
43+ with :
44+ registry : ghcr.io
45+ username : ${{ github.actor }}
46+ password : ${{ secrets.GITHUB_TOKEN }}
47+
3248 - name : Extract metadata (tags, labels) for Docker
3349 id : meta
3450 uses : docker/metadata-action@v3
3551 with :
36- images : bchew/dynamodump
52+ images : |
53+ ${{ github.repository }}
54+ public.ecr.aws/a7p1j9f6/dynamodump
55+ ghcr.io/${{ github.repository }}
3756
3857 - name : Build and push Docker image
3958 uses : docker/build-push-action@v2
You can’t perform that action at this time.
0 commit comments