Skip to content

Commit f3b656b

Browse files
Update docker-image.yml
1 parent 822b219 commit f3b656b

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/docker-image.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,3 +18,16 @@ jobs:
1818
run: mvn clean install
1919
- name: Build the Docker image
2020
run: docker build . --file Dockerfile --tag my-image-name:$(date +%s)
21+
- name: 'Build and push image'
22+
uses: rtvu/build-and-push-to-docker-hub-action@v2
23+
with:
24+
tags: latest
25+
token: ${{ secrets.DOCKER_HUB_TOKEN }}
26+
username: ${{ secrets.DOCKER_HUB_USERNAME }}
27+
- name: ecr-publish
28+
uses: bitovi/github-actions-ecr-publish@v0.1.0
29+
with:
30+
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
31+
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
32+
aws_default_region: us-east-1
33+
aws_ecr_repo_name: hello-repo

0 commit comments

Comments
 (0)