File tree Expand file tree Collapse file tree 1 file changed +29
-5
lines changed
Expand file tree Collapse file tree 1 file changed +29
-5
lines changed Original file line number Diff line number Diff line change 11name : Docker Image CI
2-
2+
33on :
4+
45 push :
6+
57 branches : [ "master" ]
8+
69 pull_request :
7- branches : [ "master" ]
810
11+ branches : [ "master" ]
12+
913jobs :
10-
14+
1115 build :
12-
16+
1317 runs-on : ubuntu-latest
14-
18+
1519 steps :
20+
1621 - uses : actions/checkout@v4
22+
1723 - name : Maven Build
24+
1825 run : mvn clean install
26+
1927 - name : Build the Docker image
28+
2029 run : docker build . --file Dockerfile --tag my-image-name:$(date +%s)
30+
2131 - name : ' Build and push image'
32+
2233 uses : rtvu/build-and-push-to-docker-hub-action@v2
34+
2335 with :
36+
2437 tags : latest
38+
2539 image : ${{ secrets.DOCKER_HUB_USERNAME }}/springbootsony
40+
2641 token : ${{ secrets.DOCKER_HUB_TOKEN }}
42+
2743 username : ${{ secrets.DOCKER_HUB_USERNAME }}
44+
2845 - name : ecr-publish
46+
294748+
3049 with :
50+
3151 aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
52+
3253 aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
54+
3355 aws_default_region : us-east-1
56+
3457 aws_ecr_repo_name : hello-repo
58+
You can’t perform that action at this time.
0 commit comments