-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (40 loc) · 1.21 KB
/
Deploy_Common_Package.yml
File metadata and controls
52 lines (40 loc) · 1.21 KB
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
47
48
49
50
51
52
name: Deploy Common Package
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'common/**'
- '.github/workflows/Deploy_Common_Package.yml'
jobs:
deploy:
runs-on: ubuntu-latest
env:
REGISTRY: "public.ecr.aws/o1r5t7k5/chiksnap"
IMAGE_NAME: "common/python"
TAG: "3.9"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Configure AWS Credentials For ECR
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: "us-east-1"
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: "public"
- name: Build, tag, and push docker image to ECR
id: build-image
env:
REGISTRY: ${{ env.REGISTRY }}
IMAGE_NAME: ${{ env.IMAGE_NAME }}
TAG: ${{ env.TAG }}
run: |
cd common
docker build -t $REGISTRY/$IMAGE_NAME:$TAG .
docker push $REGISTRY/$IMAGE_NAME:$TAG