Image publishing never succeeded: GHCR rejects the capitalized repository slug, and the arm64 jobs failed on the macOS runners, which have no Docker buildx. Resolve the namespace in lowercase and build amd64 only until an arm64 runner with buildx exists; the manifest check expects one digest. The Evo deploy ran on every push to main regardless of the result of Product CI, so red commits went live. Trigger it from the completed ci workflow instead and deploy the head it verified; manual dispatch stays. The Playwright report publish failed every nightly run because the S3 settings are not configured. The script now skips the gallery with a notice when they are missing instead of failing the job. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01MRtGG9ARfqqhma3t85Ro2u
86 lines
3.3 KiB
YAML
86 lines
3.3 KiB
YAML
name: evo-deploy
|
|
|
|
# Deploy evOo-local on the Evo host once Product CI has passed on main, or on manual dispatch.
|
|
# Runs ON the self-hosted Evo runner (no SSH, no deploy secrets in the workflow).
|
|
on:
|
|
workflow_run:
|
|
workflows: [ci]
|
|
types: [completed]
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
inputs:
|
|
ref:
|
|
description: Git ref or SHA to deploy (default main tip)
|
|
required: false
|
|
default: main
|
|
dry_run:
|
|
description: Dry run (no git/service changes)
|
|
type: boolean
|
|
default: false
|
|
skip_migrate:
|
|
description: Skip database migrations
|
|
type: boolean
|
|
default: false
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
concurrency:
|
|
group: evo-deploy
|
|
cancel-in-progress: false
|
|
|
|
jobs:
|
|
deploy:
|
|
if: vars.EVO_DEPLOY_ENABLED == 'true' && (github.event_name == 'workflow_dispatch' || github.event.workflow_run.conclusion == 'success')
|
|
runs-on: [self-hosted, evoo-ci, Linux]
|
|
timeout-minutes: 30
|
|
steps:
|
|
- name: Checkout deploy scripts
|
|
uses: actions/checkout@v5
|
|
with:
|
|
persist-credentials: false
|
|
ref: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.workflow_run.head_sha }}
|
|
|
|
- name: Deploy evOo-local on Evo
|
|
env:
|
|
EVO_DEPLOY_DIR: ${{ vars.EVO_DEPLOY_DIR }}
|
|
EVO_DEPLOY_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.workflow_run.head_sha }}
|
|
EVO_DRY_RUN: ${{ github.event.inputs.dry_run || 'false' }}
|
|
EVO_MIGRATE: ${{ github.event.inputs.skip_migrate == true && 'false' || 'true' }}
|
|
EVO_RESTART_MODE: ${{ vars.EVO_RESTART_MODE || 'auto' }}
|
|
EVO_SYSTEMD_UNIT: ${{ vars.EVO_SYSTEMD_UNIT || '' }}
|
|
EVO_SYSTEMD_SCOPE: ${{ vars.EVO_SYSTEMD_SCOPE || 'user' }}
|
|
EVO_TMUX_SESSION: ${{ vars.EVO_TMUX_SESSION || 'evoo' }}
|
|
EVO_API_HEALTH_URL: ${{ vars.EVO_API_HEALTH_URL || 'http://127.0.0.1:3100/health' }}
|
|
EVO_WEB_HEALTH_URL: ${{ vars.EVO_WEB_HEALTH_URL || 'http://127.0.0.1:5173/' }}
|
|
EVO_HEALTH_TIMEOUT_SEC: ${{ vars.EVO_HEALTH_TIMEOUT_SEC || '120' }}
|
|
run: |
|
|
set -euo pipefail
|
|
EVO_DEPLOY_DIR="${EVO_DEPLOY_DIR:-${HOME}/Projects/evOo-local}"
|
|
export EVO_DEPLOY_DIR
|
|
test -d "$EVO_DEPLOY_DIR" || { echo "EVO_DEPLOY_DIR missing: $EVO_DEPLOY_DIR" >&2; exit 1; }
|
|
args=()
|
|
[[ "$EVO_DRY_RUN" == "true" ]] && args+=(--dry-run)
|
|
[[ "$EVO_MIGRATE" == "false" ]] && args+=(--skip-migrate)
|
|
bash "${GITHUB_WORKSPACE}/ops/evo-deploy/deploy.sh" "${args[@]}"
|
|
|
|
- name: Deploy summary
|
|
if: always()
|
|
env:
|
|
EVO_DEPLOY_DIR: ${{ vars.EVO_DEPLOY_DIR }}
|
|
run: |
|
|
EVO_DEPLOY_DIR="${EVO_DEPLOY_DIR:-${HOME}/Projects/evOo-local}"
|
|
EVO_STATE_FILE="$EVO_DEPLOY_DIR/.evo-deploy/state.json"
|
|
{
|
|
echo "### Evo deploy"
|
|
echo
|
|
echo "- Ref: \`${{ github.event_name == 'workflow_dispatch' && github.event.inputs.ref || github.event.workflow_run.head_sha }}\`"
|
|
echo "- Dir: \`$EVO_DEPLOY_DIR\`"
|
|
if [[ -f "$EVO_STATE_FILE" ]]; then
|
|
echo "- State:"
|
|
echo '```json'
|
|
cat "$EVO_STATE_FILE"
|
|
echo '```'
|
|
fi
|
|
} >> "$GITHUB_STEP_SUMMARY"
|