Skip to content

Commit

Permalink
worflows change-환경변수
Browse files Browse the repository at this point in the history
  • Loading branch information
김교휘 authored and 김교휘 committed May 20, 2024
1 parent 6c63f8e commit 85d9260
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions .github/workflows/cogo_cicd_gradle.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Java CI with Gradle
name: Build and Deploy

on:
push:
Expand Down Expand Up @@ -72,7 +72,26 @@ jobs:
# 새 컨테이너 실행
- name: Docker run new container
run: |
sudo docker run --name cogo --rm -d -p 8080:8080 ${{ secrets.DOCKERHUB_USERNAME }}/cogoserver
sudo docker run --name cogo --rm -d -p 8080:8080 \
-e DB_URL=${{ secrets.DB_URL }} \
-e DB_USERNAME=${{ secrets.DB_USERNAME }} \
-e DB_PW=${{ secrets.DB_PW }} \
-e MAIL_SENDER=${{ secrets.MAIL_SENDER }} \
-e MAIL_PW=${{ secrets.MAIL_PW }} \
-e JWT_SECRET=${{ secrets.JWT_SECRET }} \
-e NAVER_ID=${{ secrets.NAVER_ID }} \
-e NAVER_SECRET=${{ secrets.NAVER_SECRET }} \
-e NAVER_REDIRECT=${{ secrets.NAVER_REDIRECT }} \
-e GOOGLE_ID=${{ secrets.GOOGLE_ID }} \
-e GOOGLE_SECRET=${{ secrets.GOOGLE_SECRET }} \
-e GOOGLE_REDIRECT=${{ secrets.GOOGLE_REDIRECT }} \
-e KAKAO_ID=${{ secrets.KAKAO_ID }} \
-e KAKAO_SECRET=${{ secrets.KAKAO_SECRET }} \
-e KAKAO_REDIRECT=${{ secrets.KAKAO_REDIRECT }} \
-e BUCKET_NAME=${{ secrets.BUCKET_NAME }} \
-e S3_ACCESS=${{ secrets.S3_ACCESS }} \
-e S3_SECRET=${{ secrets.S3_SECRET }} \
${{ secrets.DOCKERHUB_USERNAME }}/cogoserver
sleep 5 # 컨테이너 실행 시간을 확보
sudo docker ps -a # 모든 컨테이너 목록 출력
Expand All @@ -83,6 +102,3 @@ jobs:
# 미사용 Docker 이미지 삭제
- name: Delete old docker image
run: sudo docker system prune -f



0 comments on commit 85d9260

Please sign in to comment.