Skip to content

Commit

Permalink
cicd: 환경변수 추가 (#33)
Browse files Browse the repository at this point in the history
- jwt, OAuth, Redis 관련 환경변수 추가
  • Loading branch information
7zrv authored Nov 23, 2024
1 parent 125efc7 commit a792350
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,25 @@ jobs:
Continuous-Integration:
runs-on: ubuntu-latest

#Action 환경에서 Redis 실행을 위한 설정 추후 서버 배포시 제거 예정
services:
redis:
image: redis
ports:
- 6379:6379


env:
DB_URL: ${{ secrets.DB_URL }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
REDIS_HOST: ${{ secrets.REDIS_HOST}}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
NAVER_SCOPE: ${{ secrets.NAVER_SCOPE }}
JWT_SECRET: ${{ secrets.JWT_SECRET }}


steps:
- name: Github Repository 파일 불러오기
Expand Down Expand Up @@ -52,11 +67,9 @@ jobs:
run: chmod +x ./gradlew
shell: bash


- name: 빌드 및 테스트
run: ./gradlew build


- name: Close PR, if build fail
if: ${{ failure() }}
uses: actions/github-script@v6
Expand All @@ -79,7 +92,6 @@ jobs:
title: updated_title,
state: 'closed'
})
- name: 도커 허브 로그인
run:
Expand All @@ -90,10 +102,9 @@ jobs:
docker build -t 7zrv/somemore:${GITHUB_SHA::7} -t 7zrv/somemore:latest .
docker push 7zrv/somemore:${GITHUB_SHA::7}
docker push 7zrv/somemore:latest
- name: SonarCloud 빌드및 분석
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
run: ./gradlew build sonar --info
run: ./gradlew build sonar --info

0 comments on commit a792350

Please sign in to comment.