Skip to content

Merge pull request #124 from Hju95/#88예약게시글삭제 #8

Merge pull request #124 from Hju95/#88예약게시글삭제

Merge pull request #124 from Hju95/#88예약게시글삭제 #8

Workflow file for this run

name: Java CI with Gradle
env:
PROJECT_NAME: kernelsquare
BUCKET_NAME: kernel-square-bucket
CODE_DEPLOY_APP_NAME: KernelSquare
DEPLOYMENT_GROUP_NAME: KernelSquareDeployGroup
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
services:
redis:
image: redis:latest
ports:
- 6379:6379
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
- name: Set test yml
uses: microsoft/variable-substitution@v1
with:
files: ./src/test/resources/application.yml
env:
spring.security.jwt.secret: ${{ secrets.JWT_SECRET_KEY }}
custom.domain.image.baseUrl: ${{ secrets.BASE_URL }}
cloud.aws.s3.bucket: ${{ secrets.S3_BUCKET_NAME }}
cloud.aws.region.static: ${{ secrets.S3_REGION }}
cloud.aws.credentials.accessKey: ${{ secrets.AWS_ACCESS_KEY }}
cloud.aws.credentials.secretKey: ${{ secrets.AWS_ACCESS_SECRET }}
- name: Set main yml
uses: microsoft/variable-substitution@v1
with:
files: ./src/main/resources/application.yml
env:
spring.security.jwt.secret: ${{ secrets.JWT_SECRET_KEY }}
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
- name: Build with Gradle
uses: gradle/gradle-build-action@bd5760595778326ba7f1441bcf7e88b49de61a25 # v2.6.0
with:
arguments: build
# 나중을 위한 자동 CI/CD
# - name: Make Zip File
# run: zip -qq -r ./$GITHUB_SHA.zip .
#
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} # 등록한 Github Secret이 자동으로 불려온다.
# aws-secret-access-key: ${{ secrets.AWS_ACCESS_SECRET }} # 등록한 Github Secret이 자동으로 불려온다.
# aws-region: ap-northeast-2
#
# - name: Upload to S3
# run: aws s3 cp --region ap-northeast-2 ./$GITHUB_SHA.zip s3://$BUCKET_NAME/$PROJECT_NAME/$GITHUB_SHA.zip
#
# - name: Code Deploy
# run: aws deploy create-deployment --application-name $CODE_DEPLOY_APP_NAME --deployment-config-name CodeDeployDefault.OneAtATime --deployment-group-name $DEPLOYMENT_GROUP_NAME --s3-location bucket=$BUCKET_NAME,bundleType=zip,key=$PROJECT_NAME/$GITHUB_SHA.zip
#