mirror of
https://github.com/ryankazokas/turbovault-app.git
synced 2026-04-16 22:12:53 +00:00
Update workflows
This commit is contained in:
20
.github/workflows/build-and-deploy.yml
vendored
20
.github/workflows/build-and-deploy.yml
vendored
@@ -67,6 +67,26 @@ jobs:
|
|||||||
echo "$KUBECONFIG_CONTENT" | base64 -d > ~/.kube/config
|
echo "$KUBECONFIG_CONTENT" | base64 -d > ~/.kube/config
|
||||||
chmod 600 ~/.kube/config
|
chmod 600 ~/.kube/config
|
||||||
|
|
||||||
|
- name: Run database migrations
|
||||||
|
run: |
|
||||||
|
echo "🗄️ Running database migrations..."
|
||||||
|
|
||||||
|
# Delete old migration job if it exists
|
||||||
|
kubectl delete job turbovault-migrate -n turbovault --ignore-not-found=true
|
||||||
|
|
||||||
|
# Update the migration job with the new image version
|
||||||
|
sed "s|image: ghcr.io/ryankazokas/turbovault-app:.*|image: ghcr.io/ryankazokas/turbovault-app:${{ steps.version.outputs.tag }}|" \
|
||||||
|
k8s/migrate-job.yaml | kubectl apply -f -
|
||||||
|
|
||||||
|
# Wait for migration to complete
|
||||||
|
echo "⏳ Waiting for migrations to complete..."
|
||||||
|
kubectl wait --for=condition=complete --timeout=5m job/turbovault-migrate -n turbovault
|
||||||
|
|
||||||
|
echo "✅ Migrations complete!"
|
||||||
|
echo ""
|
||||||
|
echo "📋 Migration logs:"
|
||||||
|
kubectl logs job/turbovault-migrate -n turbovault
|
||||||
|
|
||||||
- name: Deploy to Kubernetes
|
- name: Deploy to Kubernetes
|
||||||
run: |
|
run: |
|
||||||
echo "🚀 Deploying version ${{ steps.version.outputs.tag }} to Kubernetes..."
|
echo "🚀 Deploying version ${{ steps.version.outputs.tag }} to Kubernetes..."
|
||||||
|
|||||||
Reference in New Issue
Block a user