Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: CD

on:
push:
branches:
- main # main ๋ธŒ๋žœ์น˜ push ์‹œ ์ž๋™ ๋ฐฐํฌ
workflow_dispatch: # ์ˆ˜๋™ ์‹คํ–‰
workflow_run:
workflows: ["CI with Gradle"] # CI ์›Œํฌํ”Œ๋กœ ์ด๋ฆ„๊ณผ ์ •ํ™•ํžˆ ์ผ์น˜ํ•ด์•ผ ํ•จ
types: [completed] # CI๊ฐ€ ๋๋‚ฌ์„ ๋•Œ ํŠธ๋ฆฌ๊ฑฐ
branches: [main] # main ์—์„œ๋งŒ

permissions:
contents: read
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ jobs:
- name: Build JAR
run: ./gradlew bootJar -x test --no-daemon

- name: Upload JAR artifact
uses: actions/upload-artifact@v4
with:
name: app-jar
path: build/libs/*.jar

docker-push:
name: Docker Build & Push
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
Expand All @@ -52,6 +58,12 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Download JAR artifact
uses: actions/download-artifact@v4
with:
name: app-jar
path: build/libs

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
Expand Down