-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #104 from Triumers/dev
- Loading branch information
Showing
20 changed files
with
631 additions
and
323 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,80 +1,80 @@ | ||
name: Deploy-service | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
push: | ||
branches: ["main", "dev"] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
shell: bash | ||
|
||
- name: Install envsubst | ||
run: sudo apt-get install -y gettext | ||
|
||
- name: Make application.yml | ||
run: | | ||
mkdir -p src/main/resources | ||
echo "${{ secrets.DB_YML }}" | base64 --decode > src/main/resources/application.yml | ||
find src | ||
- name: Make gradle.properties | ||
run: | | ||
echo "${{ secrets.GRADLE_PROPERTIES }}" | base64 --decode > gradle.properties | ||
- name: Gradle 빌드 | ||
run: ./gradlew clean build | ||
env: | ||
DB_URL: ${{ secrets.DB_URL }} | ||
DB_USER_NAME: ${{ secrets.DB_USER_NAME }} | ||
DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
|
||
- name: Get current time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: Show Current Time | ||
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | ||
shell: bash | ||
|
||
- name: Generate deployment package | ||
run: | | ||
mkdir -p deploy | ||
JAR_FILE=$(find build/libs -name "*.jar" | head -n 1) | ||
cp "$JAR_FILE" deploy/application.jar | ||
cp Procfile deploy/Procfile | ||
mkdir -p deploy/.ebextensions | ||
mkdir -p deploy/.platform | ||
if [ -d ".ebextensions" ]; then cp -r .ebextensions/* deploy/.ebextensions/; fi | ||
if [ -d ".platform" ]; then cp -r .platform/* deploy/.platform/; fi | ||
cd deploy && zip -r deploy.zip . | ||
- name: Beanstalk Deploy | ||
uses: einaregilsson/beanstalk-deploy@v22 | ||
with: | ||
aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
application_name: Triumers-Back | ||
environment_name: Triumers-Back-env | ||
version_label: github-action-${{steps.current-time.outputs.formattedTime}} | ||
region: ap-northeast-2 | ||
deployment_package: deploy/deploy.zip | ||
#name: Deploy-service | ||
# | ||
#permissions: | ||
# contents: read | ||
# pull-requests: write | ||
# | ||
#on: | ||
# push: | ||
# branches: ["main", "dev"] | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Set up JDK 17 | ||
# uses: actions/setup-java@v4 | ||
# with: | ||
# java-version: '17' | ||
# distribution: 'corretto' | ||
# | ||
# - name: Grant execute permission for gradlew | ||
# run: chmod +x ./gradlew | ||
# shell: bash | ||
# | ||
# - name: Install envsubst | ||
# run: sudo apt-get install -y gettext | ||
# | ||
# - name: Make application.yml | ||
# run: | | ||
# mkdir -p src/main/resources | ||
# echo "${{ secrets.DB_YML }}" | base64 --decode > src/main/resources/application.yml | ||
# find src | ||
# | ||
# - name: Make gradle.properties | ||
# run: | | ||
# echo "${{ secrets.GRADLE_PROPERTIES }}" | base64 --decode > gradle.properties | ||
# | ||
# - name: Gradle 빌드 | ||
# run: ./gradlew clean build | ||
# env: | ||
# DB_URL: ${{ secrets.DB_URL }} | ||
# DB_USER_NAME: ${{ secrets.DB_USER_NAME }} | ||
# DB_PASSWORD: ${{ secrets.DB_PASSWORD }} | ||
# | ||
# - name: Get current time | ||
# uses: 1466587594/get-current-time@v2 | ||
# id: current-time | ||
# with: | ||
# format: YYYY-MM-DDTHH-mm-ss | ||
# utcOffset: "+09:00" | ||
# | ||
# - name: Show Current Time | ||
# run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | ||
# shell: bash | ||
# | ||
# - name: Generate deployment package | ||
# run: | | ||
# mkdir -p deploy | ||
# JAR_FILE=$(find build/libs -name "*.jar" | head -n 1) | ||
# cp "$JAR_FILE" deploy/application.jar | ||
# cp Procfile deploy/Procfile | ||
# mkdir -p deploy/.ebextensions | ||
# mkdir -p deploy/.platform | ||
# if [ -d ".ebextensions" ]; then cp -r .ebextensions/* deploy/.ebextensions/; fi | ||
# if [ -d ".platform" ]; then cp -r .platform/* deploy/.platform/; fi | ||
# cd deploy && zip -r deploy.zip . | ||
# | ||
# - name: Beanstalk Deploy | ||
# uses: einaregilsson/beanstalk-deploy@v22 | ||
# with: | ||
# aws_access_key: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# aws_secret_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
# application_name: Triumers-Back | ||
# environment_name: Triumers-Back-env | ||
# version_label: github-action-${{steps.current-time.outputs.formattedTime}} | ||
# region: ap-northeast-2 | ||
# deployment_package: deploy/deploy.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,72 +1,72 @@ | ||
name: GPT CR | ||
|
||
permissions: | ||
contents: read | ||
pull-requests: write | ||
|
||
on: | ||
push: | ||
branches: [ "dev", "main" ] | ||
pull_request: | ||
branches: [ "dev", "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 17 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '17' | ||
distribution: 'corretto' | ||
|
||
- name: Gradle 설정 | ||
uses: gradle/actions/setup-gradle@v3 | ||
|
||
- name: Make application.yml | ||
run: | | ||
mkdir -p src/main/resources | ||
echo "${{ secrets.DB_YML }}" | base64 --decode > src/main/resources/application.yml | ||
find src | ||
- name: Make gradle.properties | ||
run: | | ||
echo "${{ secrets.GRADLE_PROPERTIES }}" | base64 --decode > gradle.properties | ||
- name: Grant execute permission for gradlew | ||
run: chmod +x ./gradlew | ||
shell: bash | ||
|
||
- name: Build with Gradle | ||
run: ./gradlew clean build | ||
shell: bash | ||
|
||
- name: Get current time | ||
uses: 1466587594/get-current-time@v2 | ||
id: current-time | ||
with: | ||
format: YYYY-MM-DDTHH-mm-ss | ||
utcOffset: "+09:00" | ||
|
||
- name: Show Current Time | ||
run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | ||
shell: bash | ||
|
||
- name: ChatGPT codeReviewer | ||
uses: anc95/ChatGPT-CodeReview@v1.0.13 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
|
||
# Optional | ||
LANGUAGE: Korean | ||
OPENAI_API_ENDPOINT: https://api.openai.com/v1 | ||
MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models | ||
PROMPT: Please check if there are any confusions or irregularities in the following code diff | ||
top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p | ||
temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature | ||
max_tokens: 10000 | ||
MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length. | ||
#name: GPT CR | ||
# | ||
#permissions: | ||
# contents: read | ||
# pull-requests: write | ||
# | ||
#on: | ||
# push: | ||
# branches: [ "dev", "main" ] | ||
# pull_request: | ||
# branches: [ "dev", "main" ] | ||
# | ||
#jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - name: Checkout | ||
# uses: actions/checkout@v4 | ||
# | ||
# - name: Set up JDK 17 | ||
# uses: actions/setup-java@v4 | ||
# with: | ||
# java-version: '17' | ||
# distribution: 'corretto' | ||
# | ||
# - name: Gradle 설정 | ||
# uses: gradle/actions/setup-gradle@v3 | ||
# | ||
# - name: Make application.yml | ||
# run: | | ||
# mkdir -p src/main/resources | ||
# echo "${{ secrets.DB_YML }}" | base64 --decode > src/main/resources/application.yml | ||
# find src | ||
# | ||
# - name: Make gradle.properties | ||
# run: | | ||
# echo "${{ secrets.GRADLE_PROPERTIES }}" | base64 --decode > gradle.properties | ||
# | ||
# - name: Grant execute permission for gradlew | ||
# run: chmod +x ./gradlew | ||
# shell: bash | ||
# | ||
# - name: Build with Gradle | ||
# run: ./gradlew clean build | ||
# shell: bash | ||
# | ||
# - name: Get current time | ||
# uses: 1466587594/get-current-time@v2 | ||
# id: current-time | ||
# with: | ||
# format: YYYY-MM-DDTHH-mm-ss | ||
# utcOffset: "+09:00" | ||
# | ||
# - name: Show Current Time | ||
# run: echo "CurrentTime=${{steps.current-time.outputs.formattedTime}}" | ||
# shell: bash | ||
# | ||
# - name: ChatGPT codeReviewer | ||
# uses: anc95/ChatGPT-CodeReview@v1.0.13 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | ||
# | ||
# # Optional | ||
# LANGUAGE: Korean | ||
# OPENAI_API_ENDPOINT: https://api.openai.com/v1 | ||
# MODEL: gpt-3.5-turbo # https://platform.openai.com/docs/models | ||
# PROMPT: Please check if there are any confusions or irregularities in the following code diff | ||
# top_p: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-top_p | ||
# temperature: 1 # https://platform.openai.com/docs/api-reference/chat/create#chat/create-temperature | ||
# max_tokens: 10000 | ||
# MAX_PATCH_LENGTH: 10000 # if the patch/diff length is large than MAX_PATCH_LENGTH, will be ignored and won't review. By default, with no MAX_PATCH_LENGTH set, there is also no limit for the patch/diff length. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.