File tree Expand file tree Collapse file tree 2 files changed +17
-12
lines changed
Expand file tree Collapse file tree 2 files changed +17
-12
lines changed Original file line number Diff line number Diff line change 1- name : Release workflow
1+ name : Deployment workflow
22
33on :
4- push :
5- branches : troubleshoot-eks
6- # release:
7- # types: [published]
4+ workflow_call :
5+ inputs :
6+ IMAGE_TAG :
7+ required : true
8+ type : string
89
910env :
1011 IMAGE_NAME : samanthamorris684/catbot
1112 EKS_CLUSTER_NAME : catbot-cluster
13+ NAMESPACE : cat-chatbot
1214
1315jobs :
14- build-push- deploy-image :
15- name : Build and push image then deploy to EKS
16+ deploy-to-eks :
17+ name : Deploy to EKS
1618 runs-on : ubuntu-latest
1719 steps :
1820 - name : Configure AWS credentials
2729
2830 - name : Deploy to EKS
2931 run : |
30- kubectl set image deployment/server server=samanthamorris684/catbot:test -n cat-chatbot
32+ kubectl set image deployment/server server=${{ env.IMAGE_NAME }}:${{ inputs.IMAGE_TAG }} -n ${{ env.NAMESPACE }}
3133 kubectl rollout status deployment/server -n cat-chatbot
Original file line number Diff line number Diff line change @@ -2,9 +2,7 @@ name: Main branch workflow
22
33on :
44 push :
5- branches : troubleshoot-eks
6- # release:
7- # types: [published]
5+ branches : main
86
97env :
108 IMAGE_NAME : samanthamorris684/catbot
1311 build-and-push-image :
1412 uses : ./.github/workflows/build-and-push.yml
1513 with :
16- IMAGE_TAG : test # $GITHUB_SHA
14+ IMAGE_TAG : $GITHUB_SHA
1715 secrets :
1816 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
1922
You can’t perform that action at this time.
0 commit comments