Update CI workflow to use new container naming and registry path
Some checks failed
CI/CD / test-backend (pull_request) Successful in 9s
CI/CD / test-frontend (pull_request) Successful in 10s
CI/CD / build-and-deploy (pull_request) Failing after 17s
CI/CD Pipeline / Overall Status ✅ Все проверки прошли успешно
CI/CD / pr-status (pull_request) Successful in 1s
Some checks failed
CI/CD / test-backend (pull_request) Successful in 9s
CI/CD / test-frontend (pull_request) Successful in 10s
CI/CD / build-and-deploy (pull_request) Failing after 17s
CI/CD Pipeline / Overall Status ✅ Все проверки прошли успешно
CI/CD / pr-status (pull_request) Successful in 1s
- Changed container name from 'fastapi-container' to 'fastapi-test-container' for clarity. - Updated image tag to reference the new registry path 'git.rlkdev.ru/RLK/fastapi-app:latest'. - Adjusted logs check to reflect the new container name for successful application startup detection.
This commit is contained in:
@@ -93,22 +93,22 @@ jobs:
|
||||
context: .
|
||||
push: false
|
||||
load: true
|
||||
tags: fastapi-app:latest
|
||||
tags: git.rlkdev.ru/RLK/fastapi-app:latest
|
||||
cache-from: type=local,src=/tmp/.buildx-cache
|
||||
cache-to: type=local,dest=/tmp/.buildx-cache,mode=max
|
||||
|
||||
- name: Stop and remove old container
|
||||
run: |
|
||||
docker stop fastapi-container || true
|
||||
docker rm fastapi-container || true
|
||||
docker stop fastapi-test-container || true
|
||||
docker rm fastapi-test-container || true
|
||||
|
||||
- name: Run new container
|
||||
run: |
|
||||
docker run -d \
|
||||
--name fastapi-container \
|
||||
--name fastapi-test-container \
|
||||
-p 8080:8000 \
|
||||
--restart unless-stopped \
|
||||
fastapi-app:latest
|
||||
git.rlkdev.ru/RLK/fastapi-app:latest
|
||||
|
||||
- name: Wait for container to be ready
|
||||
run: |
|
||||
@@ -116,7 +116,7 @@ jobs:
|
||||
interval=2
|
||||
elapsed=0
|
||||
while [ $elapsed -lt $timeout ]; do
|
||||
if docker logs fastapi-container 2>&1 | grep -q "Application startup complete"; then
|
||||
if docker logs fastapi-test-container 2>&1 | grep -q "Application startup complete"; then
|
||||
echo "Application startup detected in logs"
|
||||
echo "Deployment successful!"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user