-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 1.61 KB
/
leets-actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: mouda-dev
on:
push:
branches:
- dev
jobs:
# build:
# runs-on: ubuntu-24.04
#
# steps:
# - name: 레포지토리 체크아웃
# uses: actions/checkout@v4
#
# - name: JDK 17을 설치
# uses: actions/setup-java@v4
# with:
# java-version: '17'
# distribution: 'corretto'
#
# - name: gradlew 권한 부여
# run: chmod +x gradlew
#
# - name: Gradle 빌드
# run: ./gradlew build
deploy:
runs-on: self-hosted
steps:
- name: change permission
run: |
sudo chown -R ubuntu:ubuntu /home/ubuntu/actions-runner/_work/Leets-BE
- name: 레포지토리 체크아웃
uses: actions/checkout@v4
- name: JDK 17을 설치
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'corretto'
- name: gradlew 권한 부여
run: chmod +x gradlew
- name: Gradle 빌드
run: ./gradlew clean build -x test
- name: DockerHub 로그인
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME_MOUDA }}
password: ${{ secrets.DOCKER_PASSWORD_MOUDA }}
- name: 도커 이미지 빌드 및 푸시
run: |
docker build -t 2024mouda/mouda-be:latest .
docker push 2024mouda/mouda-be:latest
- name: Docker Compose up
run: |
docker compose -f docker-compose.yml down mouda-be
docker compose -f docker-compose.yml pull mouda-be
docker compose -f docker-compose.yml up -d mouda-be