File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : dockerhub_cd.yml
2+
3+ on :
4+ push :
5+ branches :
6+ - develop
7+
8+ jobs :
9+ docker-build-and-push :
10+ runs-on : ubuntu-latest
11+
12+ env :
13+ GIT_USERNAME : ${{ secrets.GIT_USERNAME }}
14+ GIT_TOKEN : ${{ secrets.GIT_TOKEN }}
15+
16+ steps :
17+ - name : Checkout source
18+ uses : actions/checkout@v3
19+
20+ - name : Set up Java
21+ uses : actions/setup-java@v4
22+ with :
23+ distribution : ' temurin'
24+ java-version : 21
25+
26+ - run : chmod +x ./gradlew
27+
28+ - name : Run tests
29+ run : ./gradlew test
30+
31+ - name : Build JAR
32+ run : ./gradlew build
33+
34+ - name : Docker login
35+ uses : docker/login-action@v3
36+ with :
37+ username : ${{ secrets.DOCKERHUB_USERNAME }}
38+ password : ${{ secrets.DOCKERHUB_TOKEN }}
39+
40+ - name : Build and push Docker image
41+ uses : docker/build-push-action@v5
42+ with :
43+ context : .
44+ push : true
45+ tags : |
46+ sunwoo11/come2us-api-gateway:latest
You can’t perform that action at this time.
0 commit comments