Skip to content

Commit

Permalink
chore: add default action build script
Browse files Browse the repository at this point in the history
  • Loading branch information
CChuYong committed Nov 15, 2023
1 parent b35ebe4 commit 2980bbd
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 이미지 빌드 & 푸쉬
on:
workflow_call:

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: Gradle 애드온 준비하기
uses: gradle/gradle-build-action@v2

- name: 이미지 빌드하고 푸쉬하기
id: build-image
run: |
chmod +x ./gradlew &&
./gradlew bootJar
21 changes: 21 additions & 0 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: 프로덕션 워크플로우
on:
push:
branches: [ 'main' ]
paths:
- 'src/**' # 어드민 API 코드가 변경된 경우
- '.github/workflows/**' # 워크플로우와 관련된 파일이 변경된 경우
- 'build.gradle' # Parent Gradle 모듈 설정이 변경된 경우
- 'settings.gradle' # Parent Gradle 설정이 변경된 경우

concurrency:
group: production

jobs:
call-build-workflow:
if: github.event_name == 'push'
name: 이미지 빌드
uses: ./.github/workflows/build.yaml
permissions:
id-token: write
contents: read

0 comments on commit 2980bbd

Please sign in to comment.