From a792350af7b0741b3f15466a2280d3e01890303e Mon Sep 17 00:00:00 2001 From: seojin Yoon <90759319+7zrv@users.noreply.github.com> Date: Sun, 24 Nov 2024 02:31:55 +0900 Subject: [PATCH] =?UTF-8?q?cicd:=20=ED=99=98=EA=B2=BD=EB=B3=80=EC=88=98=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80=20(#33)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - jwt, OAuth, Redis 관련 환경변수 추가 --- .github/workflows/CI.yml | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index ce1845d65..a5e1e90d5 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -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 파일 불러오기 @@ -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 @@ -79,7 +92,6 @@ jobs: title: updated_title, state: 'closed' }) - - name: 도커 허브 로그인 run: @@ -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 \ No newline at end of file + run: ./gradlew build sonar --info