Skip to content

Commit

Permalink
fix: 롤백 시 이미지의 이전 버전을 제대로 불러오지 못하는 오류 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
robinjoon committed Sep 19, 2024
1 parent d7d1f0f commit 36f408b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 12 deletions.
13 changes: 2 additions & 11 deletions .github/workflows/backend_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,12 @@ jobs:
find_now_version:
runs-on: [ self-hosted, devel-up-prod-a ]
outputs:
prev: ${{steps.find_version.outputs.name}}
prev_image_version: ${{steps.find_version.outputs.name}}
steps:
- id: find_version
run: |
PREVIOUS_IMAGE_NAME=$(docker ps --format "{{.Image}}")
echo "name=$PREVIOUS_IMAGE_NAME" >> $GITHUB_OUTPUT
echo $PREVIOUS_IMAGE_NAME
testJob:
runs-on: [ self-hosted, devel-up-prod-a ]
needs: find_now_version
steps:
- name: aaaa
run: |
echo ${{ needs.find_now_version.outputs.prev }}
echo ${{ needs.find_now_version.outputs }}
build:
name: 🏗️ Build Jar and Upload Docker Image
Expand Down Expand Up @@ -113,7 +104,7 @@ jobs:
working-directory: backend

env:
BACKEND_APP_IMAGE_NAME: ${{ needs.find_now_version.outputs.prev }}
BACKEND_APP_IMAGE_NAME: ${{ needs.find_now_version.outputs.prev_image_version }}

steps:
- run: |
Expand Down
2 changes: 1 addition & 1 deletion backend/src/main/java/develup/api/HealthApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ public class HealthApi {

@GetMapping("/health")
public ResponseEntity<ApiResponse<String>> health() {
return ResponseEntity.status(400).body(new ApiResponse<>("up"));
return ResponseEntity.status(200).body(new ApiResponse<>("up"));
}
}

0 comments on commit 36f408b

Please sign in to comment.