fix(admin): restore clean persian dashboard and monitoring page, remove extra workflows
Deploy Canina / deploy (push) Failing after 3s

This commit is contained in:
parsa aghaei committed 2026-10-26 11:58:20 +03:30
1 parent effe30ee58
commit ec93af0064
7 files changed
+378 -205

No files matched your search

@@ -1,69 +0,0 @@
name: Approved narrow auth schema reconciliation
on:
push:
branches:
- ops/auth-schema-stage
- ops/auth-schema-production
jobs:
reconcile:
runs-on: canina
steps:
- name: Authenticated host narrow schema operation (no deployment)
shell: bash
env:
CI_EVENT: ${{ github.event_name }}
CI_REF: ${{ github.ref }}
SQL_SHA: 8a22f3e89efb3dacc24f3ed9337ae87d0b4345da003a607bc1994478f69c6feb
APPROVAL_ID: CEO-AUTH-SCHEMA-20261025
DEPLOY_SHA: ${{ github.sha }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
PRODUCTION_SCHEMA_APPROVAL: ${{ secrets.PRODUCTION_AUTH_SCHEMA_APPROVAL }}
REVIEWED_SCHEMA_COMMIT: ${{ secrets.REVIEWED_AUTH_SCHEMA_COMMIT }}
STAGE_AUTH_ACCEPTANCE: ${{ secrets.STAGE_AUTH_SCHEMA_ACCEPTANCE }}
run: |
set -euo pipefail
set +x
[[ "$CI_EVENT" == push ]]
case "$CI_REF" in
refs/heads/ops/auth-schema-stage) TARGET_ENV=stage ;;
refs/heads/ops/auth-schema-production) TARGET_ENV=production ;;
*) exit 2 ;;
esac
[[ "$SQL_SHA" =~ ^[0-9a-f]{64}$ && "$DEPLOY_SHA" =~ ^[0-9a-f]{40}$ ]]
[[ "$APPROVAL_ID" =~ ^[A-Za-z0-9_-]{4,100}$ ]]
[[ "$REVIEWED_SCHEMA_COMMIT" == "$DEPLOY_SHA" ]]
schema_ok=no; auth_ok=no
if [[ "$TARGET_ENV" == production ]]; then
[[ -n "$PRODUCTION_SCHEMA_APPROVAL" && "$PRODUCTION_SCHEMA_APPROVAL" == "$DEPLOY_SHA:$SQL_SHA:$APPROVAL_ID" ]]
[[ "$STAGE_AUTH_ACCEPTANCE" == "$DEPLOY_SHA:$SQL_SHA" ]]
schema_ok=yes; auth_ok=yes
fi
[[ -n "$DEPLOY_KEY" && -n "$DEPLOY_KNOWN_HOSTS" ]]
umask 077
scratch=$(mktemp -d)
trap 'rm -rf "$scratch"' EXIT
printf '%s\n' "$DEPLOY_KEY" > "$scratch/key"
printf '%s\n' "$DEPLOY_KNOWN_HOSTS" > "$scratch/known_hosts"
unset DEPLOY_KEY DEPLOY_KNOWN_HOSTS PRODUCTION_SCHEMA_APPROVAL
ssh-keygen -F '[87.248.133.138]:2234' -f "$scratch/known_hosts" >/dev/null
ssh -F /dev/null -T -p 2234 -i "$scratch/key" -o BatchMode=yes -o IdentitiesOnly=yes -o IdentityAgent=none -o StrictHostKeyChecking=yes -o UserKnownHostsFile="$scratch/known_hosts" -o GlobalKnownHostsFile=/dev/null devops@87.248.133.138 "sudo -n bash -s -- $DEPLOY_SHA $TARGET_ENV $SQL_SHA $schema_ok $auth_ok" <<'HOST'
set -euo pipefail
set +x
umask 077
sha=$1; target=$2; sql_sha=$3
[[ ! -e /.dockerenv && $(id -u) == 0 ]]
work=$(mktemp -d /opt/services/canina/auth-reconcile-XXXXXX)
trap 'rm -rf "$work"' EXIT
git clone --quiet --no-checkout /opt/services/canina/stage "$work"
remote=$(git -C /opt/services/canina/stage remote get-url origin)
git -C "$work" fetch --quiet "$remote" "$sha"
git -C "$work" checkout --quiet --detach "$sha"
cd "$work"
[[ $(git rev-parse HEAD) == "$sha" ]]
if [[ $target == production ]]; then
[[ $4 == yes && $5 == yes ]]
export PRODUCTION_SCHEMA_APPROVED="$sha:$sql_sha" STAGE_AUTH_ACCEPTANCE_APPROVED="$sha:$sql_sha"
fi
GITHUB_ACTIONS=true bash scripts/ci-auth-schema-reconcile.sh "$target" "$sha" "$sql_sha"
HOST
@@ -1,29 +0,0 @@
name: Hermes runtime contract review (NO DEPLOY)
on:
workflow_dispatch:
permissions:
contents: read
jobs:
contract-review:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Editorial Python protocol and deadline regressions (no inference)
run: PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s infra/hermes-editorial/tests -v
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: npm
cache-dependency-path: backend/package-lock.json
- run: npm ci --ignore-scripts --no-audit
working-directory: backend
- run: npm test -- --runInBand hermes-management
working-directory: backend
- run: npx tsc -p src/hermes-management/tsconfig.contract.json --noEmit
working-directory: backend
- run: npx tsc -p src/hermes-management/tsconfig.contract.json
working-directory: backend
# No SSH, Docker socket, secrets, deployments, dispatch or runtime mutation.
-41
View File
@@ -1,41 +0,0 @@
name: Owner authorized Stage test principal
on:
workflow_dispatch:
inputs:
approval:
required: true
description: "Exact owner grant: owner-authorized-stage-editorial"
session:
required: true
description: "Unique session (8-64 lowercase letters/digits/hyphens)"
ttl:
required: true
description: "Bounded session TTL, 60-3600 seconds"
action:
required: true
description: "open or close"
jobs:
principal:
if: github.ref == 'refs/heads/develop'
runs-on: canina
steps:
- name: Explicit authenticated Stage CI seed authority
shell: bash
env:
BRANCH: ${{ github.ref_name }}
DEPLOY_SHA: ${{ github.sha }}
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
STAGE_TEST_APPROVAL: ${{ inputs.approval }}
STAGE_TEST_SESSION: ${{ inputs.session }}
STAGE_TEST_TTL_SECONDS: ${{ inputs.ttl }}
STAGE_TEST_ACTION: ${{ inputs.action }}
run: |
set -euo pipefail
set +x
[[ "$DEPLOY_SHA" =~ ^[a-f0-9]{40}$ ]] || exit 2
umask 077
script=$(mktemp)
trap 'rm -f "$script"' EXIT
wget --no-proxy -qO "$script" "https://git.parsaaghayi.ir/parsa/canina/raw/commit/$DEPLOY_SHA/scripts/ci-stage-test-principal.sh"
bash "$script"