fix: change image name

This commit is contained in:
Boris Arzentar 2024-09-24 16:48:12 +02:00
parent 58db1ac2c8
commit 0b47a703f9
4 changed files with 25 additions and 25 deletions

View file

@ -1,20 +1,20 @@
name: 'Build Docker images for PromethAI'
description: 'Build PromethAI-related Docker images and push to the Docker registry (AWS ECR)'
name: 'Build Docker images for Cognee'
description: 'Build cognee-related Docker images and push to the Docker registry (AWS ECR)'
inputs:
stage:
description: 'The stage of the pipeline, such as "dev" or "prd", for the PromethAI app'
description: 'The stage of the pipeline, such as "dev" or "prd", for the Cognee app'
required: true
aws_account_id:
description: 'The AWS account ID for the PromethAI app'
description: 'The AWS account ID for the Cognee app'
required: true
should_publish:
description: 'Whether to publish the PromethAI Docker image to AWS ECR; should be either "true" or "false"'
description: 'Whether to publish the Cognee Docker image to AWS ECR; should be either "true" or "false"'
required: true
ecr_image_repo_name:
description: 'The Docker image ECR repository name for the PromethAI app, such as "workflows"'
description: 'The Docker image ECR repository name for the Cognee app, such as "workflows"'
required: true
dockerfile_location:
description: 'The directory location of the Dockerfile for the PromethAI app'
description: 'The directory location of the Dockerfile for the Cognee app'
required: true
runs:

View file

@ -15,13 +15,13 @@ env:
jobs:
publish_docker_to_ecr:
name: Publish Docker PromethAI image
name: Publish Cognee Docker image
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Take code from repo
- name: Checkout code from repo
uses: actions/checkout@v3
- name: Set environment variable for stage
id: set-env
@ -40,23 +40,23 @@ jobs:
with:
role-to-assume: ${{ env.AWS_ROLE_DEV_CICD }}
aws-region: eu-west-1
- name: Create Docker image and push to ECR
- name: Build Docker image and push to ECR
uses: ./.github/actions/image_builder
id: generate-promethai-docker
id: build-cognee-docker-image
with:
stage: dev
aws_account_id: ${{ env.AWS_ACCOUNT_ID_DEV }}
should_publish: true
ecr_image_repo_name: promethai-dev-backend-promethai-backend
ecr_image_repo_name: cognee-dev-backend-cognee-api/cognee-dev
dockerfile_location: ./
- name: Export Docker image tag
id: export-promethai-docker-tag
- name: Export Cognee image tag
id: export-cognee-image-tag
run: |
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
echo "Docker tag is: $DOCKER_TAG"
echo "promethai_docker_tag_backend=$DOCKER_TAG" >> $GITHUB_OUTPUT
export IMAGE_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
echo "Docker tag is: $IMAGE_TAG"
echo "cognee_image_tag=$IMAGE_TAG" >> $GITHUB_OUTPUT
outputs:
promethai_docker_tag_backend: ${{ steps.export-promethai-docker-tag.outputs.promethai_docker_tag_backend }}
cognee_image_tag: ${{ steps.export-cognee-image-tag.outputs.cognee_image_tag }}
apply_tf:
name: Trigger terraform apply workflow

View file

@ -8,18 +8,18 @@ env:
jobs:
build_docker:
name: Build PromethAI Backend Docker App Image
name: Build Cognee Backend Docker App Image
runs-on: ubuntu-latest
steps:
- name: Check out PromethAI code
- name: Check out Cognee code
uses: actions/checkout@v3
- name: Build PromethAI backend Docker image tag
id: backend-docker-tag
- name: Build Cognee Docker image
id: cognee-docker-tag
run: |
export SHA_SHORT="$(git rev-parse --short HEAD)"
export CUR_DATE="$(date +%Y%m%d%H%M%S)"
export VERSION="dev-$CUR_DATE-$SHA_SHORT"
image_name="backend" docker_login="false" version="$VERSION" account="${{ env.AWS_ACCOUNT_ID_DEV }}" app_dir="backend" publish="false" ./bin/dockerize
image_name="cognee" docker_login="false" version="$VERSION" account="${{ env.AWS_ACCOUNT_ID_DEV }}" app_dir="." publish="false" ./bin/dockerize
export DOCKER_TAG=$(cat /tmp/.DOCKER_IMAGE_VERSION)
echo "Successfully built PromethAI backend Docker tag is: $DOCKER_TAG"
echo "Successfully built cognee Docker image. Tag is: $DOCKER_TAG"

View file

@ -8,7 +8,7 @@ STAGE=${stage:-"dev"}
SHA_SHORT="$(git rev-parse --short HEAD)"
CUR_DATE="$(date +%Y%m%d%H%M%S)"
VERSION="$STAGE-$CUR_DATE-$SHA_SHORT"
IMAGE_NAME=${image_name:-promethai-${STAGE}-promethai-backend}
IMAGE_NAME=${image_name:-cognee-${STAGE}}
REPO_NAME="${AWS_REPOSITORY}/${IMAGE_NAME}"
FULL_IMAGE_NAME="${REPO_NAME}:${VERSION}"