CI/CD Gitea v1.0
Some checks failed
Deploy to Staging / Build Images (push) Failing after 7s
Deploy to Staging / Deploy to Staging (push) Has been skipped
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Failing after 6s
Some checks failed
Deploy to Staging / Build Images (push) Failing after 7s
Deploy to Staging / Deploy to Staging (push) Has been skipped
Deploy to Staging / Verify Staging (push) Has been skipped
Deploy to Staging / Notify Staging Ready (push) Has been skipped
Deploy to Staging / Notify Staging Failure (push) Failing after 6s
This commit is contained in:
67
.gitea/workflows/maintenance.yaml
Normal file
67
.gitea/workflows/maintenance.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
# MotoVaultPro Maintenance Migration Workflow
|
||||
# Manual trigger for breaking database migrations requiring downtime
|
||||
|
||||
name: Maintenance Migration
|
||||
run-name: Maintenance Migration
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
create_backup:
|
||||
description: 'Create database backup before migration'
|
||||
required: true
|
||||
default: 'yes'
|
||||
type: choice
|
||||
options:
|
||||
- 'yes'
|
||||
- 'no'
|
||||
|
||||
env:
|
||||
DEPLOY_PATH: /opt/motovaultpro
|
||||
|
||||
jobs:
|
||||
maintenance-migration:
|
||||
name: Run Maintenance Migration
|
||||
runs-on: mvp-prod
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Send maintenance start notification
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/notify.sh
|
||||
./scripts/ci/notify.sh maintenance_start "Starting maintenance window for database migration"
|
||||
env:
|
||||
DEPLOY_NOTIFY_EMAIL: ${{ vars.DEPLOY_NOTIFY_EMAIL }}
|
||||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||
|
||||
- name: Run maintenance migration
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/maintenance-migrate.sh
|
||||
if [ "${{ inputs.create_backup }}" = "yes" ]; then
|
||||
./scripts/ci/maintenance-migrate.sh backup
|
||||
else
|
||||
./scripts/ci/maintenance-migrate.sh
|
||||
fi
|
||||
|
||||
- name: Send maintenance complete notification
|
||||
if: success()
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/notify.sh
|
||||
./scripts/ci/notify.sh maintenance_end "Maintenance window complete. Database migration successful."
|
||||
env:
|
||||
DEPLOY_NOTIFY_EMAIL: ${{ vars.DEPLOY_NOTIFY_EMAIL }}
|
||||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||
|
||||
- name: Send maintenance failure notification
|
||||
if: failure()
|
||||
run: |
|
||||
cd "$DEPLOY_PATH"
|
||||
chmod +x scripts/ci/notify.sh
|
||||
./scripts/ci/notify.sh failure "Maintenance migration FAILED. Manual intervention required."
|
||||
env:
|
||||
DEPLOY_NOTIFY_EMAIL: ${{ vars.DEPLOY_NOTIFY_EMAIL }}
|
||||
RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }}
|
||||
Reference in New Issue
Block a user