-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (40 loc) · 1.12 KB
/
build-and-deploy.yaml
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
name: 이미지 빌드 & 푸쉬
on:
push:
branches: [ 'develop', 'feature/#49' ]
paths:
- '.github/workflows/**'
- 'build.gradle.kts'
- 'settings.gradle.kts'
- 'src/**'
env:
ACTIVE_PROFILE: prod
jobs:
build:
runs-on: [ ubuntu-latest ]
name: 이미지 빌드하기
permissions:
id-token: write
contents: read
steps:
- name: GitHub 에서 레포 받아오기
uses: actions/checkout@v3
- name: JDK17 준비하기
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: 도커허브 로그인
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Gradle 준비하기
uses: gradle/gradle-build-action@v2
- name: 이미지 빌드하고 푸쉬하기
id: build-image
run: |
chmod +x ./gradlew &&
export IMAGE_TAG=$(git rev-parse --short HEAD) &&
export IMAGE_NAME=${{ secrets.IMAGE_NAME }} &&
./gradlew jib