Skip to content

Commit

Permalink
feat: CD 실행 트리거 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
ImGdevel committed Feb 3, 2025
1 parent b65b2bf commit 7e71354
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/backend-cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:
workflows: ["TOONPICK Backend CI Pipeline"]
types:
- completed

permissions:
actions: write
contents: write
workflow_dispatch:
inputs:
trigger_by:
description: 'Triggered by'
required: true
default: 'CI pipeline'

jobs:
deploy:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest

steps:
Expand All @@ -31,5 +32,4 @@ jobs:
docker rm toonpick-service-app || true
docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/toonpick-service-app:latest
docker-compose up -d
10 changes: 8 additions & 2 deletions .github/workflows/backend-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: 저장소 체크아웃
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}
token: ${{ secrets.PAT_TOKEN }}

- name: JDK 17 설정
uses: actions/setup-java@v3
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
- name: 저장소 체크아웃
uses: actions/checkout@v3
with:
token: ${{ secrets.PAT_TOKEN }}
token: ${{ secrets.PAT_TOKEN }}

- name: 빌드된 JAR 파일 다운로드 (아티팩트 복원)
uses: actions/download-artifact@v4
Expand All @@ -88,3 +88,9 @@ jobs:
docker push $DOCKER_HUB_USERNAME/$REPOSITORY:$IMAGE_TAG
docker push $DOCKER_HUB_USERNAME/$REPOSITORY:latest
- name: CD Pipeline 실행 트리거
uses: benc-uk/workflow-dispatch@v1
with:
workflow: "backend-cd.yml"
token: ${{ secrets.PAT_TOKEN }}

0 comments on commit 7e71354

Please sign in to comment.