Skip to content

Commit

Permalink
QA-138 Part 1 Add generic docker push action (#51)
Browse files Browse the repository at this point in the history
Add generic docker push action
  • Loading branch information
tateexon committed Nov 16, 2022
1 parent 1533bff commit b5dda0f
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 1 deletion.
3 changes: 2 additions & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
@@ -1,2 +1,3 @@
# chainlink-testing-framework
/chainlink-testing-framework/ @tateexon @kalverra @skudasov @anieeG
/chainlink-testing-framework/ @tateexon @kalverra @skudasov @anieeG @gheorghestrimtu
/docker/ @tateexon @kalverra @skudasov @anieeG @gheorghestrimtu
46 changes: 46 additions & 0 deletions docker/build-push/action.yml
@@ -0,0 +1,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 }}

0 comments on commit b5dda0f

Please sign in to comment.