Skip to content

Merge pull request #66 from onehealthtoolkit/fix_issues #59

Merge pull request #66 from onehealthtoolkit/fix_issues

Merge pull request #66 from onehealthtoolkit/fix_issues #59

Workflow file for this run

name: build and push to ECR
on:
push:
branches:
- main
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
build:
name: Docker build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: configure AWS credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: arn:aws:iam::317555312301:role/githubaction
aws-region: us-east-1
- name: login to AWS ECR
id: login-ecr-public
uses: aws-actions/amazon-ecr-login@v1
with:
registry-type: public
- name: build, tag, and push image to ECR
env:
REGISTRY: ${{ steps.login-ecr-public.outputs.registry }}
REGISTRY_ALIAS: g0x0v6d0
REPOSITORY: ohtk-api
IMAGE_TAG: latest
run: |
docker build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG .
docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG