File tree Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Expand file tree Collapse file tree 1 file changed +43
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : " Build"
2
+
3
+ inputs :
4
+ aws-access-key-id :
5
+ required : true
6
+
7
+ aws-secret-access-key :
8
+ required : true
9
+
10
+ aws-region :
11
+ required : true
12
+
13
+ aws-ecr-repository :
14
+ required : true
15
+
16
+ outputs :
17
+ image :
18
+
19
+ runs :
20
+ using : " composite"
21
+ steps :
22
+ - name : Checkout repository
23
+ uses : actions/checkout@v4
24
+
25
+ - name : Configure AWS Credentials
26
+ uses : aws-actions/configure-aws-credentials@v4
27
+ with :
28
+ aws-access-key-id : ${{ inputs.aws-access-key-id }}
29
+ aws-secret-access-key : ${{ inputs.aws-secret-access-key }}
30
+ aws-region : ${{ inputs.aws-region }}
31
+
32
+ - name : Login to Amazon ECR
33
+ uses : aws-actions/amazon-ecr-login@v2
34
+ id : ecr-login
35
+
36
+ - name : Build and push Docker image
37
+ shell : bash
38
+ env :
39
+ IMAGE : ${{ steps.ecr-login.outputs.registry }}/${{ inputs.aws-ecr-repository }}:${{ github.sha }}
40
+ run : |
41
+ docker build . -t $IMAGE -f docker/Dockerfile
42
+ docker push $IMAGE
43
+ echo "image=$IMAGE" >> "$GITHUB_OUTPUT"
You can’t perform that action at this time.
0 commit comments