sqlite-web 0.7.2
gitea.db
action_run_job
Create
Query
access
access_token
action
action_artifact
action_run
action_run_index
action_run_job
action_runner
action_runner_token
action_schedule
action_schedule_spec
action_task
action_task_output
action_task_step
action_tasks_version
action_variable
app_state
attachment
auth_token
badge
branch
collaboration
comment
commit_status
commit_status_index
commit_status_summary
commit_sync_log
commit_sync_status
dbfs_data
dbfs_meta
deploy_key
email_address
email_hash
external_login_user
follow
gpg_key
gpg_key_import
hook_task
issue
issue_assignees
issue_content_history
issue_dependency
issue_index
issue_label
issue_pin
issue_user
issue_watch
label
language_stat
lfs_lock
lfs_meta_object
login_source
milestone
mirror
notice
notification
oauth2_application
oauth2_authorization_code
oauth2_grant
org_user
package
package_blob
package_blob_upload
package_cleanup_rule
package_file
package_property
package_version
project
project_board
project_issue
protected_branch
protected_tag
public_key
pull_auto_merge
pull_request
push_mirror
reaction
release
renamed_branch
repo_archiver
repo_hidden_file
repo_indexer_status
repo_license
repo_redirect
repo_topic
repo_transfer
repo_unit
repository
review
review_state
secret
session
sqlite_sequence
star
stopwatch
system_setting
task
team
team_invite
team_repo
team_unit
team_user
topic
tracked_time
two_factor
upload
user
user_badge
user_blocking
user_open_id
user_redirect
user_setting
version
watch
webauthn_credential
webhook
Toggle helper tables
Structure
Content
Query
Insert
Drop
Import
Export
Delete row 15143 from action_run_job
id
15143
run_id
10538
repo_id
6
owner_id
5
commit_sha
624893ef324e57874ecb721dfd5539eb58d49b8e
is_fork_pull_request
0
name
Production 自动回滚
attempt
0
workflow_payload
name: CI/CD Deploy "on": # test-pipeli
name: CI/CD Deploy "on": # test-pipeline 通过后自动触发(仅 main 分支) workflow_run: workflows: ["Test Pipeline"] types: [completed] branches: [main] # 版本标签触发完整部署 push: tags: ['v*'] # 手动触发 workflow_dispatch: inputs: environment: description: '部署环境' required: true default: 'staging' type: choice options: - staging - production - aliyun - rollback-production - rollback-aliyun skip_tests: description: '跳过测试(紧急修复)' required: false default: false type: boolean version: description: '部署版本号(留空使用自动版本)' required: false type: string env: IMAGE_PREFIX: ${{ github.repository_owner }}/juhi NODE_VERSION: "20" PNPM_VERSION: "8" REGISTRY: ghcr.io jobs: auto-rollback-production: name: Production 自动回滚 runs-on: ubuntu-latest if: failure() && needs.deploy-production.result == 'failure' steps: - uses: webfactory/ssh-agent@v0.8.0 with: ssh-private-key: ${{ secrets.PRODUCTION_SSH_KEY }} - name: 配置 SSH Known Hosts run: | mkdir -p ~/.ssh echo "${{ secrets.PRODUCTION_SSH_KNOWN_HOSTS }}" >> ~/.ssh/known_hosts chmod 644 ~/.ssh/known_hosts - name: 执行回滚 run: | ssh $USER@$HOST << 'EOF' cd /opt/juhi echo "==> Production 自动回滚..." if [ -f "./scripts/rollback.sh" ]; then chmod +x ./scripts/rollback.sh ./scripts/rollback.sh --confirm -y else PREV_LINE=$(tail -1 .deploy-history 2>/dev/null) PREV_API=$(echo "$PREV_LINE" | cut -d'|' -f2) PREV_FE=$(echo "$PREV_LINE" | cut -d'|' -f3) if [ -n "$PREV_API" ] && [ "$PREV_API" != "none" ]; then export API_IMAGE="$PREV_API" export FRONTEND_IMAGE="$PREV_FE" docker compose -f docker-compose.prod.yml up -d --no-deps api frontend RETRY=0 until curl -sf http://localhost:3000/health > /dev/null 2>&1; do RETRY=$((RETRY + 1)) [ $RETRY -ge 12 ] && { echo "回滚后健康检查失败"; exit 1; } sleep 5 done echo "==> 回滚成功" else echo "无法获取上一版本,需要手动回滚" exit 1 fi fi EOF env: HOST: ${{ secrets.PRODUCTION_HOST }} USER: ${{ secrets.PRODUCTION_USER }} timeout-minutes: "10"
...
job_id
auto-rollback-production
needs
["deploy-production"]
runs_on
["ubuntu-latest"]
task_id
0
status
3
started
0
stopped
1775098675
created
1775098642
updated
1775098675
raw_concurrency
is_concurrency_evaluated
0
concurrency_group
concurrency_cancel
0
Delete
Cancel