Skip to content

[Chore] add appspec.yml #20

[Chore] add appspec.yml

[Chore] add appspec.yml #20

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will build a Java project with Gradle and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-gradle
name: Java CI with Gradle
on:
push:
branches: [ "dev" ]
pull_request:
branches: [ "dev" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
# 작업 엑세스 가능하게 $GITHUB_WORKSPACE에서 저장소를 체크아웃
- name: Checkout branch
uses: actions/checkout@v3
# java 버전 세팅
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
# git ignore한 yml 파일들 github secret에서 복사해 오기
- name: Copy secret
env:
OCCUPY_SECRET: ${{ secrets.OCCUPY_SECRET }}
OCCUPY_DB_SECRET: ${{ secrets.OCCUPY_DB_SECRET }}
OCCUPY_OAUTH_SECRET: ${{ secrets.OCCUPY_OAUTH_SECRET }}
OCCUPY_SECRET_DIR: ./src/main/resources
OCCUPY_DB_SECRET_DIR: ./src/main/resources/database
OCCUPY_OAUTH_SECRET_DIR: ./src/main/resources/oauth2
OCCUPY_SECRET_DIR_FILE_NAME: application.yml
OCCUPY_DB_SECRET_DIR_FILE_NAME: application-database.yml
OCCUPY_OAUTH_SECRET_DIR_FILE_NAME: application-oauth2.yml
run: |
mkdir $OCCUPY_DB_SECRET_DIR
mkdir $OCCUPY_OAUTH_SECRET_DIR
touch $OCCUPY_SECRET_DIR/$OCCUPY_SECRET_DIR_FILE_NAME
touch $OCCUPY_DB_SECRET_DIR/$OCCUPY_DB_SECRET_DIR_FILE_NAME
touch $OCCUPY_OAUTH_SECRET_DIR/$OCCUPY_OAUTH_SECRET_DIR_FILE_NAME
echo "$OCCUPY_SECRET" > $OCCUPY_SECRET_DIR/$OCCUPY_SECRET_DIR_FILE_NAME
echo "$OCCUPY_DB_SECRET" > $OCCUPY_DB_SECRET_DIR/$OCCUPY_DB_SECRET_DIR_FILE_NAME
echo "$OCCUPY_OAUTH_SECRET" > $OCCUPY_OAUTH_SECRET_DIR/$OCCUPY_OAUTH_SECRET_DIR_FILE_NAME
# gradlew 실행 권한 부여
- name: Run chmod to make gradlew executable
run: chmod +x ./gradlew
shell: bash
# Build -> jar 파일 생성
- name: Build with Gradle
run: ./gradlew clean build -x test
shell: bash