File tree Expand file tree Collapse file tree 3 files changed +34
-14
lines changed
Expand file tree Collapse file tree 3 files changed +34
-14
lines changed Original file line number Diff line number Diff line change 1- name : Release workflow
1+ name : Deployment workflow
22
33on :
4- release :
5- types : [published]
4+ workflow_call :
5+ inputs :
6+ IMAGE_TAG :
7+ required : true
8+ type : string
69
710env :
811 IMAGE_NAME : samanthamorris684/catbot
912 EKS_CLUSTER_NAME : catbot-cluster
13+ NAMESPACE : cat-chatbot
1014
1115jobs :
12- build-push- deploy-image :
13- name : Build and push image then deploy to EKS
16+ deploy-to-eks :
17+ name : Deploy to EKS
1418 runs-on : ubuntu-latest
1519 steps :
16- - name : Build and push to Docker Hub
17- uses : ./.github/workflows/build-and-push.yml
18- with :
19- IMAGE_TAG : $GITHUB_SHA
20- DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
21-
2220 - name : Configure AWS credentials
2321 uses : aws-actions/configure-aws-credentials@v1
2422 with :
3129
3230 - name : Deploy to EKS
3331 run : |
34- kubectl set image deployment/server samanthamorris684/catbot=samanthamorris684/catbot:$GITHUB_SHA
35- kubectl rollout status deployment/server
32+ kubectl set image deployment/server server=${{ env.IMAGE_NAME }}:${{ inputs.IMAGE_TAG }} -n ${{ env.NAMESPACE }}
33+ kubectl rollout status deployment/server -n cat-chatbot
Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Feature branch workflow
22
33on :
44 push :
5- branches-ignore : [main ]
5+ branches-ignore : [troubleshoot-eks ]
66
77jobs :
88 build-and-push-feature :
Original file line number Diff line number Diff line change 1+ name : Main branch workflow
2+
3+ on :
4+ push :
5+ branches : main
6+
7+ env :
8+ IMAGE_NAME : samanthamorris684/catbot
9+
10+ jobs :
11+ build-and-push-image :
12+ uses : ./.github/workflows/build-and-push.yml
13+ with :
14+ IMAGE_TAG : $GITHUB_SHA
15+ secrets :
16+ DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
17+
18+ deploy-to-eks :
19+ uses : ./.github/workflows/deploy-to-eks.yml
20+ with :
21+ IMAGE_TAG : $GITHUB_SHA
22+
You can’t perform that action at this time.
0 commit comments