File tree Expand file tree Collapse file tree 1 file changed +12
-9
lines changed
Expand file tree Collapse file tree 1 file changed +12
-9
lines changed Original file line number Diff line number Diff line change 11name : 이미지 빌드 & 푸쉬
22on :
3+ workflow_dispatch :
34 push :
4- branches : [ 'develop ' ]
5+ branches : [ 'main ' ]
56 paths :
67 - ' .github/workflows/**'
78 - ' build.gradle.kts'
@@ -24,10 +25,10 @@ jobs:
2425 - name : GitHub 에서 레포 받아오기
2526 uses : actions/checkout@v3
2627
27- - name : JDK17 준비하기
28+ - name : JDK21 준비하기
2829 uses : actions/setup-java@v3
2930 with :
30- java-version : ' 17 '
31+ java-version : ' 21 '
3132 distribution : ' temurin'
3233
3334 - name : 도커허브 로그인
@@ -41,17 +42,19 @@ jobs:
4142
4243 - name : 이미지 빌드하고 푸쉬하기
4344 id : build-image
45+ env :
46+ GITHUB_SHA : ${{ env.short_commit }}
47+ DOCKER_USER : ${{ secrets.DOCKER_USERNAME }}
4448 run : |
45- echo "image-tag=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT &&
46- chmod +x ./gradlew &&
47- export IMAGE_TAG=$(git rev-parse --short HEAD) &&
48- export IMAGE_NAME=${{ secrets.IMAGE_NAME }} &&
49+ chmod +x ./gradlew
4950 ./gradlew jib
5051
5152 - name : 도커 배포하기
52- uses : appleboy/ssh-action@v1.0.3
53+ uses : appleboy/ssh-action@v1.2.0
5354 with :
5455 host : ${{ secrets.SSH_HOST }}
5556 username : ${{ secrets.SSH_USERNAME }}
5657 key : ${{ secrets.SSH_KEY }}
57- script : sudo docker service update makers_web --image ${{ secrets.IMAGE_NAME }}:${{ steps.build-image.outputs.image-tag }}
58+ script : |
59+ cd ${{ secrets.SSH_PATH }}
60+ chmod +x ./deploy.sh dev
You can’t perform that action at this time.
0 commit comments