Skip to content

Commit

Permalink
fix: 깃허브 액션 시크릿 구성 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin0o0 committed Oct 19, 2023
1 parent eb93bce commit cf94df9
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 68 deletions.
45 changes: 12 additions & 33 deletions .github/workflows/gradle.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ jobs:
java-version: '17' #JDK 17.
distribution: 'zulu'

- name: make application-prod.yml
run: |
cd ./src/main
cd ./resources
# application.yml 파일 생성하기
touch ./application-prod.yml
echo "${{ secrets.APPLICATION_PROD }}" >> ./application-prod.yml
shell: bash

- name: Grant execute permission for gradlew
run: chmod +x gradlew

Expand All @@ -56,39 +68,6 @@ jobs:
password: ${{ secrets.DOCKERHUB_PASSWORD}}

- name: Build and Push Docker Image
env:
JWT_SECRET: ${{ secrets.JWT_SECRET }}
JWT_EXPIRATION: ${{ secrets.JWT_EXPIRATION }}
JWT_HEADER: ${{ secrets.JWT_HEADER }}
DB_URL: ${{ secrets.DB_URL }}
DB_USERNAME: ${{ secrets.DB_USERNAME }}
DB_DRIVER: ${{ secrets.DB_DRIVER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
GOOGLE_CLIENT_ID: ${{ secrets.GOOGLE_CLIENT_ID }}
GOOGLE_CLIENT_SECRET: ${{ secrets.GOOGLE_CLIENT_SECRET }}
GOOGLE_CLIENT_SCOPE: ${{ secrets.GOOGLE_CLIENT_SCOPE }}
GOOGLE_REDIRECT_URI: ${{ secrets.GOOGLE_REDIRECT_URI }}
KAKAO_AUTHORIZATION_GRANT_CODE: ${{ secrets.KAKAO_AUTHORIZATION_GRANT_CODE }}
KAKAO_AUTHORIZATION_URI: ${{ secrets.KAKAO_AUTHORIZATION_URI }}
KAKAO_CLIENT_AUTHENTICATION_METHOD: ${{ secrets.KAKAO_CLIENT_AUTHENTICATION_METHOD }}
KAKAO_CLIENT_ID: ${{ secrets.KAKAO_CLIENT_ID }}
KAKAO_CLIENT_SECRET: ${{ secrets.KAKAO_CLIENT_SECRET }}
KAKAO_REDIRECT_URI: ${{ secrets.KAKAO_REDIRECT_URI }}
KAKAO_SCOPE: ${{ secrets.KAKAO_SCOPE }}
KAKAO_TOKEN_URI: ${{ secrets.KAKAO_TOKEN_URI }}
KAKAO_USER_INFO_URI: ${{ secrets.KAKAO_USER_INFO_URI }}
KAKAO_USER_NAME_ATTRIBUTE: ${{ secrets.KAKAO_USER_NAME_ATTRIBUTE }}
NAVER_AUTHORIZATION_GRANT_TYPE: ${{ secrets.NAVER_AUTHORIZATION_GRANT_TYPE }}
NAVER_AUTHORIZATION_URI: ${{ secrets.NAVER_AUTHORIZATION_URI }}
NAVER_CLIENT_ID: ${{ secrets.NAVER_CLIENT_ID }}
NAVER_CLIENT_SECRET: ${{ secrets.NAVER_CLIENT_SECRET }}
NAVER_REDIRECT_URI: ${{ secrets.NAVER_REDIRECT_URI }}
NAVER_SCOPE: ${{ secrets.NAVER_SCOPE }}
NAVER_TOKEN_URI: ${{ secrets.NAVER_TOKEN_URI }}
NAVER_USER_INFO_URI: ${{ secrets.NAVER_USER_INFO_URI }}
NAVER_USER_NAME_ATTRIBUTE: ${{ secrets.NAVER_USER_NAME_ATTRIBUTE }}
REDIS_HOST: ${{ secrets.REDIS_HOST }}
REDIS_PORT: ${{ secrets.REDIS_PORT }}
run: |
docker buildx create --use
docker buildx build -t chy0310/khumon:latest . --push
Expand Down
35 changes: 0 additions & 35 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,39 +1,4 @@
FROM openjdk:17-jdk
ARG JAR_FILE=/build/libs/KHUMON-0.0.1-SNAPSHOT.jar

ENV JWT_SECRET=${JWT_SECRET}
ENV JWT_EXPIRATION=${JWT_EXPIRATION}
ENV JWT_HEADER=${JWT_HEADER}
ENV DB_URL=${DB_URL}
ENV DB_USERNAME=${DB_USERNAME}
ENV DB_DRIVER=${DB_DRIVER}
ENV DB_PASSWORD=${DB_PASSWORD}
ENV GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
ENV GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
ENV GOOGLE_CLIENT_SCOPE=${GOOGLE_CLIENT_SCOPE}
ENV GOOGLE_REDIRECT_URI=${GOOGLE_REDIRECT_URI}
ENV KAKAO_AUTHORIZATION_GRANT_CODE=${KAKAO_AUTHORIZATION_GRANT_CODE}
ENV KAKAO_AUTHORIZATION_URI=${KAKAO_AUTHORIZATION_URI}
ENV KAKAO_CLIENT_AUTHENTICATION_METHOD=${KAKAO_CLIENT_AUTHENTICATION_METHOD}
ENV KAKAO_CLIENT_ID=${KAKAO_CLIENT_ID}
ENV KAKAO_CLIENT_SECRET=${KAKAO_CLIENT_SECRET}
ENV KAKAO_REDIRECT_URI=${KAKAO_REDIRECT_URI}
ENV KAKAO_SCOPE=${KAKAO_SCOPE}
ENV KAKAO_TOKEN_URI=${KAKAO_TOKEN_URI}
ENV KAKAO_USER_INFO_URI=${KAKAO_USER_INFO_URI}
ENV KAKAO_USER_NAME_ATTRIBUTE=${KAKAO_USER_NAME_ATTRIBUTE}
ENV NAVER_AUTHORIZATION_GRANT_TYPE=${NAVER_AUTHORIZATION_GRANT_TYPE}
ENV NAVER_AUTHORIZATION_URI=${NAVER_AUTHORIZATION_URI}
ENV NAVER_CLIENT_ID=${NAVER_CLIENT_ID}
ENV NAVER_CLIENT_SECRET=${NAVER_CLIENT_SECRET}
ENV NAVER_REDIRECT_URI=${NAVER_REDIRECT_URI}
ENV NAVER_SCOPE=${NAVER_SCOPE}
ENV NAVER_TOKEN_URI=${NAVER_TOKEN_URI}
ENV NAVER_USER_INFO_URI=${NAVER_USER_INFO_URI}
ENV NAVER_USER_NAME_ATTRIBUTE=${NAVER_USER_NAME_ATTRIBUTE}
ENV REDIS_HOST=${REDIS_HOST}
ENV REDIS_PORT=${REDIS_PORT}


ADD ${JAR_FILE} KHUMON.jar
ENTRYPOINT ["java", "-jar", "KHUMON.jar"]

0 comments on commit cf94df9

Please sign in to comment.