[feat] Release Label 자동 생성 (#140) #99
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: develop-CD | |
on: | |
push: | |
branches: [ "develop" ] | |
jobs: | |
ci: | |
runs-on: ubuntu-22.04 | |
env: | |
working-directory: . | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
submodules: true | |
token: ${{ secrets.SUBMODULE_TOKEN }} | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'corretto' | |
java-version: '17' | |
- name: build | |
run: | | |
chmod +x gradlew | |
./gradlew build -x test | |
shell: bash | |
- name: docker login | |
uses: docker/[email protected] | |
- name: login docker hub | |
uses: docker/[email protected] | |
with: | |
username: ${{ secrets.DOCKER_LOGIN_USERNAME }} | |
password: ${{ secrets.DOCKER_LOGIN_ACCESSTOKEN }} | |
- name: Build and push | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
file: ./Dockerfile-dev | |
push: true | |
tags: ${{ secrets.DOCKER_LOGIN_USERNAME }}/${{ secrets.DEV_REPONAME }} | |
cd: | |
needs: ci | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: docker container run | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.DEV_SERVER_IP }} | |
username: ${{ secrets.DEV_SERVER_USER }} | |
key: ${{ secrets.DEV_SERVER_KEY }} | |
script: | | |
cd ~ | |
./deploy.sh |