Files
canina/.gitea/workflows/stage-natural.yml
T
Hermes Agent b21ab3699c
One owner authorized natural Stage research / acceptance (push) Successful in 11s
feat(ci): run one uncapped Stage research after reviewer cleanup
2026-10-24 16:39:25 +00:00

30 lines
1.5 KiB
YAML

name: One owner authorized natural Stage research
on:
push:
branches: [ci/v4-natural-c8063b5-20261024]
jobs:
acceptance:
runs-on: canina
steps:
- name: Close independent reviewer before supervised research
shell: bash
env:
DEPLOY_KEY: ${{ secrets.DEPLOY_KEY }}
DEPLOY_KNOWN_HOSTS: ${{ secrets.DEPLOY_KNOWN_HOSTS }}
SOURCE_SHA: ${{ github.sha }}
RUN_ATTEMPT: ${{ github.run_attempt }}
run: |
set -euo pipefail
set +x
[[ "$RUN_ATTEMPT" == 1 && "$SOURCE_SHA" =~ ^[a-f0-9]{40}$ ]]
[[ -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
ssh-keygen -F '[87.248.133.138]:2234' -f "$scratch/known_hosts" >/dev/null
wget --no-proxy -qO "$scratch/run.py" "https://git.parsaaghayi.ir/parsa/canina/raw/commit/$SOURCE_SHA/scripts/stage-natural-acceptance.py"
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 -o ConnectTimeout=15 devops@87.248.133.138 'sudo -n python3 -c '\''import sys,io; s=sys.stdin.read(); sys.stdin=io.StringIO(s); exec(compile(s,"<tracked-ci>","exec"))'\''' < "$scratch/run.py"