ci(ci): deploy tag

This commit is contained in:
Stan Girard 2023-08-18 18:41:50 +02:00
parent 2b85a94e88
commit 015f12bb4c
2 changed files with 10 additions and 3 deletions

View File

@ -3,8 +3,8 @@ name: Deploy Backend to Preview ECS
on:
push:
branches: [ "main" ]
# paths:
# - 'backend/core/**'
paths:
- 'backend/core/**'
env:
AWS_REGION: eu-west-3

View File

@ -32,6 +32,13 @@ jobs:
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
@ -50,7 +57,7 @@ jobs:
with:
context: ./backend/core/
push: true
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}, ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:latest
tags: ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ env.IMAGE_TAG }}, ${{ env.ECR_REGISTRY }}/${{ env.ECR_REPOSITORY }}:${{ github.ref_name}}, ghcr.io/stangirard/quivr:${{ github.ref_name}}
cache-from: type=gha
cache-to: type=gha,mode=max