diff --git a/.github/workflows/cicd_workflow.yml b/.github/workflows/cicd_workflow.yml index c497c65..0801fe7 100644 --- a/.github/workflows/cicd_workflow.yml +++ b/.github/workflows/cicd_workflow.yml @@ -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' @@ -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 @@ -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 @@ -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 }} @@ -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 }}