File tree Expand file tree Collapse file tree 4 files changed +28
-6
lines changed
Expand file tree Collapse file tree 4 files changed +28
-6
lines changed Original file line number Diff line number Diff line change @@ -2,13 +2,18 @@ name: Build and deploy image
22
33on :
44 workflow_call :
5+ secrets :
6+ DOCKERHUB_TOKEN :
7+ required : true
58 inputs :
69 IMAGE_TAG :
710 required : true
811 type : string
912
1013env :
1114 IMAGE_NAME : samanthamorris684/catbot
15+ USERNAME : ${{ vars.DOCKERHUB_USERNAME }}
16+ PASSWORD : ${{ secrets.DOCKERHUB_TOKEN }}
1217
1318jobs :
1419 build-and-push-image :
@@ -20,14 +25,14 @@ jobs:
2025 - name : Log in to Docker Hub
21262227 with :
23- username : ${{ vars.DOCKERHUB_USERNAME }}
24- password : ${{ secrets.DOCKERHUB_TOKEN }}
28+ username : ${{ env.USERNAME }}
29+ password : ${{ env.PASSWORD }}
2530
2631 - uses : actions/checkout@v4
2732 - name : Build and push the Docker image
2833 run : |
29- - docker build -t $IMAGE_NAME:$TAG .
30- - docker push $IMAGE_NAME:$TAG
34+ docker build -t $IMAGE_NAME:${{ inputs.IMAGE_TAG }} .
35+ docker push $IMAGE_NAME:${{ inputs.IMAGE_TAG }}
3136
3237
3338
Original file line number Diff line number Diff line change 88 build-and-push-feature :
99 uses : ./.github/workflows/build-and-push.yml
1010 with :
11- IMAGE_TAG : $GITHUB_REF_NAME
11+ IMAGE_TAG : $GITHUB_REF_NAME
12+ secrets :
13+ DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
1214
1315
Original file line number Diff line number Diff line change 88 build-and-push-main :
99 uses : ./.github/workflows/build-and-push.yml
1010 with :
11- IMAGE_TAG : main@$GITHUB_SHA
11+ IMAGE_TAG : main@$GITHUB_SHA
12+ secrets :
13+ DOCKERHUB_TOKEN : ${{ secrets.DOCKERHUB_TOKEN }}
1214
Original file line number Diff line number Diff line change 1+ name : Create release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ update-cluster :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - name : Update cluster
12+ run : helm upgrade --set image.tag=<newtag>
13+
You can’t perform that action at this time.
0 commit comments