Skip to content

docker-image.yml 변경 #4

docker-image.yml 변경

docker-image.yml 변경 #4

Workflow file for this run

name: Docker Image CI
on:
push:
branches: ["develop"]
jobs:
CI-CD:
runs-on: ubuntu-latest
steps:
# gradle caching - 빌드 시간 향상
- uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew build -x test
- name: Docker build & push
if: contains(github.ref, 'develop')
run: |
docker login -u yooonwodyd00 -p dbswodyd91
docker build -f Dockerfile -t yooonwodyd00/happynewhere_be-app .
docker push yooonwodyd00/happynewhere_be-app