diff --git a/CODEOWNERS b/CODEOWNERS index f1817a9..696fefc 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1,2 +1,3 @@ # chainlink-testing-framework -/chainlink-testing-framework/ @tateexon @kalverra @skudasov @anieeG \ No newline at end of file +/chainlink-testing-framework/ @tateexon @kalverra @skudasov @anieeG @gheorghestrimtu +/docker/ @tateexon @kalverra @skudasov @anieeG @gheorghestrimtu \ No newline at end of file diff --git a/docker/build-push/action.yml b/docker/build-push/action.yml new file mode 100644 index 0000000..500c822 --- /dev/null +++ b/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 }}