Skip to content

Commit c8c70e3

Browse files
committed
build : docker ci 파이프라인 추가
1 parent 8687555 commit c8c70e3

File tree

2 files changed

+38
-35
lines changed

2 files changed

+38
-35
lines changed

.github/workflows/build&ci.yaml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/docker-ci.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Docker CI/CD
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- 'develop'
7+
push:
8+
branches:
9+
- 'develop'
10+
11+
workflow_dispatch:
12+
13+
jobs:
14+
build-and-deploy:
15+
runs-on: ubuntu-latest
16+
17+
steps:
18+
- name: Checkout source
19+
uses: actions/checkout@v3
20+
21+
- name: Set up JDK 21
22+
uses: actions/setup-java@v3
23+
with:
24+
java-version: '21'
25+
distribution: 'temurin'
26+
27+
- name: Build with Gradle
28+
run: ./gradlew clean build -x test
29+
30+
- name: Log in to DockerHub
31+
uses: docker/login-action@v3
32+
with:
33+
username: ${{ secrets.DOCKER_USERNAME }}
34+
password: ${{ secrets.DOCKER_PASSWORD }}
35+
36+
- name: Build Docker image
37+
run: |
38+
docker build -t kangtaehyun1107/mosu-server:${{ github.sha }} .

0 commit comments

Comments
 (0)