File tree Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Expand file tree Collapse file tree 1 file changed +19
-2
lines changed Original file line number Diff line number Diff line change 8
8
pull_request :
9
9
types : [opened, synchronize, reopened]
10
10
11
-
12
11
jobs :
13
12
Package :
14
13
name : Build Test And Push Image
18
17
- name : Checkout
19
18
uses : actions/checkout@v4
20
19
20
+ - name : Configure AWS Credentials 2
21
+ uses : aws-actions/configure-aws-credentials@v4
22
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
23
+ with :
24
+ aws-region : us-east-1
25
+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
26
+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
27
+ role-to-assume : arn:aws:iam::637423374452:role/Terrafor-iac
28
+
21
29
-
uses :
benjlevesque/[email protected]
22
30
id : short-sha
23
31
with :
46
54
-Dsonar.language=go
47
55
-Dsonar.qualitygate.wait=true
48
56
49
-
50
57
- name : Login to GitHub Container Registry
51
58
uses : docker/login-action@v3
52
59
with :
81
88
REGISTRY : ghcr.io
82
89
REPOSITORY : ${{ github.repository }}
83
90
IMAGE_TAG : ${{ steps.short-sha.outputs.sha }}
91
+
92
+ - name : Login to AWS
93
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
94
+ shell : bash
95
+ run : aws eks update-kubeconfig --region us-east-1 --name development
96
+
97
+ - uses : actions-hub/kubectl@master
98
+ if : github.event_name == 'push' && github.ref == 'refs/heads/main'
99
+ with :
100
+ args : set image deployment/tech-challenge tech-challenge-container=ghcr.io/${{ github.repository }}:${{ steps.short-sha.outputs.sha }}
You can’t perform that action at this time.
0 commit comments