Skip to content

[ADD] 가계부 분석 - 예산 조회 null 해결 #355

[ADD] 가계부 분석 - 예산 조회 null 해결

[ADD] 가계부 분석 - 예산 조회 null 해결 #355

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: [ "main" ]
pull_request:
branches: [ "main" ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- uses: actions/checkout@v3
- name: make application.yml
run: |
## create application.yml
cd ./src/main/resources
# application.yml 파일 생성
touch ./application.yml
# GitHub-Actions 에서 설정한 값을 application.yml 파일에 쓰기
echo "${{ secrets.APPLICATION }}" >> ./application.yml
shell: bash
- name: Build with Gradle
run: ./gradlew bootJar
## 웹 이미지 빌드 및 도커허브에 push
- name: web docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/uliga_backend .
docker push ${{ secrets.DOCKER_REPO }}/uliga_backend
## docker compose up
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@v0.1.7
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.PEM_KEY }}
port: 22
script: |
sudo docker rm -f $(docker ps -qa)
sudo docker pull ${{ secrets.DOCKER_REPO }}/uliga_backend
sudo docker pull ${{ secrets.DOCKER_REPO }}/uliga-backend-nginx
docker-compose up -d
docker image prune -f