refactor: LIMIT 상태일때만 모집인원을 검사하도록 수정 (#66) #53
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
name: Java CI with Gradle | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: write-all | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# 웹 이미지 빌드 및 도커허브에 push | |
- name: Checkout | |
uses: actions/checkout@v2 | |
## create application-database.yaml | |
- name: make application-aws.yaml | |
run: | | |
cd ./src/main/resources | |
touch ./application-aws.yml | |
echo "${{ secrets.AWS }}" >> ./application-aws.yml | |
shell: bash | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to DockerHub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- uses: docker/build-push-action@v3 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: jungminleeee/onna:latest | |
cache-from: type=gha,scope=build-main | |
cache-to: type=gha,mode=max,scope=build-main | |
- name: copy file via ssh password | |
uses: appleboy/scp-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ec2-user | |
key: ${{ secrets.KEY }} | |
port: 22 | |
source: "docker-compose.yaml" | |
target: "/home/ec2-user/" | |
## docker compose up | |
- name: executing remote ssh commands using password | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ec2-user | |
key: ${{ secrets.KEY }} | |
port: 22 | |
script: "docker-compose pull && docker-compose up -d" |