Skip to content

updating wflow

updating wflow #38

Workflow file for this run

name: Build and Push Docker Image
on:
push:
branches:
- nikita
jobs:
build:
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: AKIA5ZOUUDPV4JSVHC5U
AWS_SECRET_ACCESS_KEY: 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
AWS_DEFAULT_REGION: us-west-1
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Login to ECR
env:
AWS_REGION: us-west-1
run: |
aws ecr get-login-password --region us-west-1 | docker login --username AWS --password-stdin 948023073771.dkr.ecr.us-west-1.amazonaws.com
- name: Build Docker image
run: docker build -t fastapi-demo .
- name: Tag Docker image
run: docker tag fastapi-demo:latest 948023073771.dkr.ecr.us-west-1.amazonaws.com/fastapi-demo:latest
- name: Push Docker image to ECR
run: docker push 948023073771.dkr.ecr.us-west-1.amazonaws.com/fastapi-demo:latest