File tree Expand file tree Collapse file tree
auth-service/src/main/java/com/devloger/authservice/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,9 +3,9 @@ name: Deploy auth-service to GKE
33on :
44 push :
55 paths :
6- - ' auth-service/**' # auth-service 디렉토리 변경만 감지
6+ - ' auth-service/**'
77 branches :
8- - main # main 브랜치에서만 트리거
8+ - main
99
1010jobs :
1111 build-deploy :
@@ -39,23 +39,19 @@ jobs:
3939 run : |
4040 gcloud auth configure-docker asia-northeast3-docker.pkg.dev --quiet
4141
42-
4342 - name : Docker Build & Push
4443 run : |
4544 IMAGE=asia-northeast3-docker.pkg.dev/${{ secrets.PROJECT_ID }}/docker-repo/auth-service:$GITHUB_SHA
4645 docker build -t $IMAGE -f auth-service/Dockerfile .
4746 docker push $IMAGE
4847
49- - name : Install GKE auth plugin
50- run : |
51- sudo apt-get install -y google-cloud-sdk-gke-gcloud-auth-plugin
52-
5348 - name : Connect to GKE
5449 run : |
5550 gcloud container clusters get-credentials ${{ secrets.CLUSTER_NAME }} \
5651 --region=${{ secrets.REGION }} --project=${{ secrets.PROJECT_ID }}
5752
5853 - name : Deploy to GKE
54+ env :
55+ IMAGE : asia-northeast3-docker.pkg.dev/${{ secrets.PROJECT_ID }}/docker-repo/auth-service:${{ github.sha }}
5956 run : |
60- IMAGE=asia-northeast3-docker.pkg.dev/${{ secrets.PROJECT_ID }}/docker-repo/auth-service:$GITHUB_SHA
61- kubectl set image deployment/auth-service auth-service=$IMAGE
57+ kubectl set image deployment/auth-service auth-service=$IMAGE
Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ public class AuthController {
2222
2323 @ GetMapping ("/test" )
2424 public ResponseEntity <String > test () {
25- return ResponseEntity .ok ("Hello, World!" );
25+ return ResponseEntity .ok ("Hello, World!! " );
2626 }
2727
2828 @ PostMapping ("/signup" )
You can’t perform that action at this time.
0 commit comments