Skip to content

Commit

Permalink
�workflow 수정
Browse files Browse the repository at this point in the history
최신 버전 Action 사용 수정
  • Loading branch information
ysw789 authored Aug 30, 2024
1 parent 21f6d4f commit 1b51e30
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/cicd_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4.1.7

- name: Set up JDK 17
uses: actions/setup-java@v3
uses: actions/setup-java@v4.2.2
with:
distribution: 'adopt'
java-version: '17'
Expand All @@ -24,20 +24,17 @@ jobs:
run: ./gradlew clean build

- name: Log in to Docker Hub
uses: docker/login-action@v2
uses: docker/login-action@v3.3.0
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1

- name: Get current time
run: echo "CURRENT_TIME=$(date +'%Y%m%d%H%M')" >> $GITHUB_ENV

- name: Build and Push Docker image - prod
if: github.ref == 'refs/heads/main'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6.7.0
with:
context: .
file: ./Dockerfile
Expand All @@ -48,7 +45,7 @@ jobs:

- name: Build and Push Docker image - dev
if: github.ref == 'refs/heads/develop'
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6.7.0
with:
context: .
file: ./Dockerfile
Expand All @@ -64,7 +61,7 @@ jobs:
steps:
- name: SSH to Server and Deploy - prod
if: github.ref == 'refs/heads/main'
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SERVER_HOST }}
port: ${{ secrets.SERVER_PORT }}
Expand All @@ -79,7 +76,7 @@ jobs:
- name: SSH to Server and Deploy - dev
if: github.ref == 'refs/heads/develop'
uses: appleboy/ssh-action@master
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.DEV_SERVER_HOST }}
port: ${{ secrets.DEV_SERVER_PORT }}
Expand Down

0 comments on commit 1b51e30

Please sign in to comment.