Compare commits
1 Commits
59fd789a91
...
dev-15
| Author | SHA1 | Date | |
|---|---|---|---|
| 24751caeb4 |
7
.github/workflows/deploy.yml
vendored
7
.github/workflows/deploy.yml
vendored
@@ -174,6 +174,8 @@ jobs:
|
|||||||
if [ -n "${BACKUP_FILE:-}" ] && [ -f "$BACKUP_FILE" ]; then
|
if [ -n "${BACKUP_FILE:-}" ] && [ -f "$BACKUP_FILE" ]; then
|
||||||
rm -f "$BACKUP_FILE" && echo "✅ Backup removed (deploy success)"
|
rm -f "$BACKUP_FILE" && echo "✅ Backup removed (deploy success)"
|
||||||
fi
|
fi
|
||||||
|
# Удаляем остановленные контейнеры, чтобы не копились после stop/recreate
|
||||||
|
docker container prune -f && echo "✅ Stopped containers pruned" || true
|
||||||
else
|
else
|
||||||
echo "❌ Container failed to start!"
|
echo "❌ Container failed to start!"
|
||||||
docker logs bots_telegram_bot --tail 50 || true
|
docker logs bots_telegram_bot --tail 50 || true
|
||||||
@@ -225,6 +227,10 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run: |
|
run: |
|
||||||
|
if ! command -v gh >/dev/null 2>&1; then
|
||||||
|
echo "⏭️ gh CLI not installed in runner, skipping PR body extraction"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
echo "🔍 Searching for merged PR associated with commit ${{ github.sha }}..."
|
echo "🔍 Searching for merged PR associated with commit ${{ github.sha }}..."
|
||||||
|
|
||||||
# Находим последний мерженный PR для master по merge commit SHA
|
# Находим последний мерженный PR для master по merge commit SHA
|
||||||
@@ -382,6 +388,7 @@ jobs:
|
|||||||
tail -n "$HISTORY_SIZE" "$HISTORY_FILE" > "${HISTORY_FILE}.tmp" && mv "${HISTORY_FILE}.tmp" "$HISTORY_FILE"
|
tail -n "$HISTORY_SIZE" "$HISTORY_FILE" > "${HISTORY_FILE}.tmp" && mv "${HISTORY_FILE}.tmp" "$HISTORY_FILE"
|
||||||
|
|
||||||
echo "✅ Rollback completed successfully"
|
echo "✅ Rollback completed successfully"
|
||||||
|
docker container prune -f && echo "✅ Stopped containers pruned" || true
|
||||||
|
|
||||||
- name: Send rollback notification
|
- name: Send rollback notification
|
||||||
if: always()
|
if: always()
|
||||||
|
|||||||
Reference in New Issue
Block a user