/
action.yml
46 lines (45 loc) · 1.44 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Build Docker Image and push to ECR
description: Common docker image builder for building chainlink docker images
inputs:
tags:
required: true
description: The full docker tag to use for the push to ecr, comma separated for multiple, example latest,develop,...
file:
required: true
description: The path to the dockerfile to build
build-args:
required: false
description: Comma separated build-args for the docker build to pass through, example KEY1=VAL1,KEY2=VAL2,...
push:
required: true
default: "true"
description: Whether we should push the image or not
AWS_REGION:
required: true
description: The AWS region to use
AWS_ROLE_TO_ASSUME:
required: true
description: The AWS role to assume
runs:
using: composite
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-region: ${{ inputs.AWS_REGION }}
role-to-assume: ${{ inputs.AWS_ROLE_TO_ASSUME }}
role-duration-seconds: 3600
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and Push
uses: docker/build-push-action@v3
id: build-image
with:
context: .
file: ${{ inputs.file }}
build-args: ${{ inputs.build-args }}
tags: ${{ inputs.tags }}
push: ${{ inputs.push }}