Skip to content

Merge pull request #138 from vyneer/feat/phrases #10

Merge pull request #138 from vyneer/feat/phrases

Merge pull request #138 from vyneer/feat/phrases #10

name: (Production) Build chat-bot container and push to ECR
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build:
name: Build Docker Image
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repo
uses: actions/Checkout@v2
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::257753203869:role/omniliberal-gitihub-ci
aws-region: us-east-1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build + push to ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: omniliberal/chat-bot
IMAGE_TAG: ${{ github.ref_name }}
run: |
docker build -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest