File tree Expand file tree Collapse file tree 7 files changed +54
-190
lines changed
Expand file tree Collapse file tree 7 files changed +54
-190
lines changed Original file line number Diff line number Diff line change 3737 ECR_REPOSITORY : galaniprojects/ctypehub
3838 IMAGE_TAG : ${{ github.sha }}
3939 run : |
40- docker tag ctypehub $ECR_REGISTRY/$ECR_REPOSITORY:latest
40+ docker tag ctypehub $ECR_REGISTRY/$ECR_REPOSITORY:dev
4141 docker tag ctypehub $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
42- docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest
42+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:dev
4343 docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
44-
45- - name : Deploy to kilt cluster
46- uses : evosecurity/kubectl-aws-eks@master
47- env :
48- KUBE_CONFIG_DATA : ${{ secrets.KUBE_CONFIG }}
49- ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
50- ECR_REPOSITORY : galaniprojects/ctypehub
51- IMAGE_TAG : ${{ github.sha }}
52- with :
53- args : set image -n ctypehub-dev deployment/ctypehub ctypehub=$ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
Load Diff This file was deleted.
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_dispatch :
3+ inputs :
4+ tag :
5+ description : " Choose environment tag"
6+ required : true
7+ type : choice
8+ options :
9+ - smoke
10+ - dev
11+ - stg
12+ - test
13+ - prod
14+
15+ name : Release pipeline
16+
17+ jobs :
18+ deploy :
19+ name : Build image and push to Amazon ECR
20+ runs-on : ubuntu-latest
21+ environment : production
22+
23+ steps :
24+ - name : Checkout
25+ uses : actions/checkout@v4
26+
27+ - name : Configure AWS credentials
28+ uses : aws-actions/configure-aws-credentials@v4
29+ with :
30+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
31+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
32+ aws-region : eu-central-1
33+
34+ - name : Login to Amazon ECR
35+ id : login-ecr
36+ uses : aws-actions/amazon-ecr-login@v2
37+ with :
38+ mask-password : ' true'
39+ - name : Build image
40+ run : |
41+ docker build -t ctypehub:latest .
42+
43+ - name : Tag, and push image to Amazon ECR
44+ env :
45+ ECR_REGISTRY : ${{ steps.login-ecr.outputs.registry }}
46+ ECR_REPOSITORY : galaniprojects/ctypehub
47+ IMAGE_TAG : ${{ github.sha }}
48+ run : |
49+ docker tag ctypehub $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.event.inputs.tag }}
50+ docker tag ctypehub $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
51+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
52+ docker push $ECR_REGISTRY/$ECR_REPOSITORY:${{ github.event.inputs.tag }}
Load Diff This file was deleted.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments