Skip to content

docs: add comment about enabling github actions #1

docs: add comment about enabling github actions

docs: add comment about enabling github actions #1

Workflow file for this run

env:
AWS_REGION: us-east-2
ECR_REPOSITORY: savantly
SHA_TAG: ${{ github.sha }}
IMAGE_TAG: $(cat VERSION)
on:
push:
branches:
- "main"
name: Build Image
jobs:
jobName:
name: Update deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configure AWS credentials
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: ${{ env.AWS_REGION }}
- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Build, tag, and push image to Amazon ECR
env:
ECR_REGISTRY: ${{ steps.login-ecr.outputs.registry }}
ECR_REPOSITORY: ${{ env.ECR_REPOSITORY }}
SHA_TAG: ${{ github.sha }}
run: |
export IMAGE_TAG=${{ env.IMAGE_TAG }}
docker buildx build --platform linux/amd64 -t $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:$SHA_TAG -t $ECR_REGISTRY/$ECR_REPOSITORY:latest .
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$IMAGE_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:$SHA_TAG
docker push $ECR_REGISTRY/$ECR_REPOSITORY:latest