-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
29 lines (26 loc) · 789 Bytes
/
action.yml
File metadata and controls
29 lines (26 loc) · 789 Bytes
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
name: Build and Push Docker image to AWS ECR
inputs:
repo:
description: 'Repository name'
required: true
tag:
description: 'Image tag'
required: true
dockerfile:
description: 'Dockerfile to use'
required: true
extra-build-args:
description: 'Extra arguments passed to `docker build`'
required: false
runs:
using: 'composite'
steps:
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push docker image to Amazon ECR
env:
REGISTRY: ${{ steps.login-ecr.outputs.registry }}
run: |
${{ github.action_path }}/push_to_ecr.sh $REGISTRY ${{ inputs.repo }} ${{ inputs.tag }} ${{ inputs.dockerfile }} "${{ inputs.extra-build-args }}"
shell: bash