Skip to content

Update: gradle 권한 업데이트 #2

Update: gradle 권한 업데이트

Update: gradle 권한 업데이트 #2

Workflow file for this run

name: Issue 18 Workflow
on:
push:
branches:
- issue/18
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
- 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
## 웹 이미지 빌드 및 도커허브에 push
- name: web docker build and push
run: |
docker login -u ${{ secrets.DOCKER_USERNAME }} -p ${{ secrets.DOCKER_PASSWORD }}
docker build -t ${{ secrets.DOCKER_REPO }}/second-eyes-web .
docker push ${{ secrets.DOCKER_REPO }}/second-eyes-web
## docker compose up
- name: executing remote ssh commands using password
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ubuntu
key: ${{ secrets.KEY }}
script: |
sudo docker rm -f $(docker ps -qa)
sudo docker pull ${{ secrets.DOCKER_REPO }}/mappin-server
sudo docker pull ${{ secrets.DOCKER_REPO }}/mappin-nginx
docker-compose up -d
docker image prune -f