fixed git stuff

This commit is contained in:
c-d-p
2025-04-22 23:14:17 +02:00
parent 02d191853b
commit 2246fb42a4
4 changed files with 28 additions and 42 deletions

View File

@@ -52,8 +52,8 @@ jobs:
file: ./backend/Dockerfile # Explicit path to Dockerfile
push: true # Push the image after building
tags: | # Use SHA for version specific, latest for general
ghcr.io/${{ github.repository_owner }}/MAIA:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/MAIA:latest
ghcr.io/${{ github.repository_owner }}/maia:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/maia:latest
# Pull latest base image updates when building (good for scheduled runs)
pull: true
cache-from: type=gha # Github Actions cache
@@ -75,13 +75,13 @@ jobs:
# Pull the specific image version built in this workflow
# Using the Git SHA ensures we deploy exactly what was just built
docker pull ghcr.io/${{ github.repository_owner }}/MAIA:${{ github.sha }}
docker pull ghcr.io/${{ github.repository_owner }}/maia:${{ github.sha }}
# Also pull latest for other services to keep up to date
docker-compose pull redis db
# Uses sed to update the compose file with the new image tag
sed -i 's|image: ghcr.io/${{ github.repository_owner }}/MAIA:.*|image: ghcr.io/${{ github.repository_owner }}/MAIA:${{ github.sha }}|g' docker-compose.yml
sed -i 's|image: ghcr.io/${{ github.repository_owner }}/maia:.*|image: ghcr.io/${{ github.repository_owner }}/maia:${{ github.sha }}|g' docker-compose.yml
echo "Updated docker-compose.yml image tag"
# Restart the services using the new image(s)