diff --git a/.github/workflows/ci-batch.yaml b/.github/workflows/ci-batch.yaml new file mode 100644 index 0000000..9c7dba9 --- /dev/null +++ b/.github/workflows/ci-batch.yaml @@ -0,0 +1,46 @@ +#name: ci-batch +# +#on: +# workflow_dispatch: +# inputs: +# job_name: +# required: true +# type: string +# description: 실행할 job 명칭 input +# +#jobs: +# ci-batch: +# runs-on: ubuntu-latest +# steps: +# - name: Git Checkout +# uses: actions/checkout@v2 +# +# - name: Setup JDK +# uses: actions/setup-java@v1 +# with: +# java-version: 17 +# +# - name: Grant execute permission for gradlew +# run: chmod +x gradlew +# +# - name: Build Gradle +# run: +# +# - name: Dockerhub Login +# uses: docker/login-action@v2 +# with: +# username: ${{ secrets.DOCKERHUB_USERNAME }} +# password: ${{ secrets.DOCKERHUB_TOKEN }} +# +# - name: Build Gradle with JIB (API) +# run: ./gradlew clean --stacktrace --build-file=./batch/build.gradle.kts --Dspring.profiles.active=prod --job.name=${{ github.event.inputs.job_name }} build +# +## - name: Execute Remote SSH & Deploy 'API' module +## uses: appleboy/ssh-action@master +## with: +## host: ${{ secrets.REMOTE_SSH_HOST }} +## username: ${{ secrets.REMOTE_SSH_USERNAME }} +## key: ${{ secrets.REMOTE_SSH_KEY }} +## script: | +## docker pull johnpark0921/lotto-portfolio +## docker container run --name lotto-portfolio -p 8080:8080 johnpark0921/lotto-portfolio \ No newline at end of file diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 71c596c..a969405 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -5,9 +5,6 @@ on: tags: - 'v**' -# TODO: -# - gitaction에서 SSH 방식으로 인스턴스 접근해서 image pull & docker run 해보기 - https://doooodle932.tistory.com/163 -# - 수동으로 gitaction 돌릴 수 있도록 설정, if문 설정하면 될듯 (api, batch 별도 배포를 위해) - https://velog.io/@gidskql6671/Github-Actions-Job%EB%93%A4%EC%9D%98-%EC%8B%A4%ED%96%89-%EC%88%9C%EC%84%9C-%EC%A0%95%ED%95%B4%EC%A3%BC%EA%B8%B0 jobs: ci: runs-on: ubuntu-latest diff --git a/api/build.gradle.kts b/api/build.gradle.kts index c26bb92..d8847e1 100644 --- a/api/build.gradle.kts +++ b/api/build.gradle.kts @@ -61,6 +61,7 @@ jib { jvmFlags = listOf( "-Dsun.net.inetaddr.ttl=0", // DNS cache TTL "-XX:+PrintCommandLineFlags", // Print JVM Flags + "-Dspring.profiles.active=prod" // profile 설정 ) } }