Skip to content

fix after merge

fix after merge #12

Workflow file for this run

name: Deploy Docker
on: [push]
jobs:
build-docker:
name: "Build docker"
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.ECR_UPLOADER_KEY }}
aws-secret-access-key: ${{ secrets.ECR_UPLOADER_SECRET }}
aws-region: us-east-1
- name: Get Current Branch
id: get-branch
uses: codio/get-branch-name-github-action@v1
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
- name: Build docker image
run: docker build -t temp_image --file ./Dockerfile.prod .
- name: Push docker image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: codio/llm-proxy
IMAGE_TAG: ${{ github.sha }}
BRANCH: ${{ steps.get-branch.outputs.branch }}
run: |
docker tag temp_image $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker tag temp_image $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$BRANCH
- name: Logout of Amazon ECR
if: always()
run: docker logout ${{ steps.login-ecr.outputs.registry }}