Files
aios/scripts/codex_gitops_online_check.sh
T
2026-07-06 19:16:31 +08:00

20 lines
971 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
cd "${AIOS_GITOPS_WORKSPACE:-/data/aios-gitops/workspace}"
expected="${1:-V1R1C4}"
test "$(git branch --show-current)" = "main"
test "$(cat VERSION | tr -d '\n')" = "$expected"
git rev-parse --verify "$expected" >/dev/null
grep -q 'git_patch_only' config/codex/gitops-online.json
grep -q 'codex-gitops-bot' config/codex/gitops-online.json
grep -q 'online_git_sync' config/codex/gitops-online.json
python3 -m py_compile active-runtime/app/aios_chatgpt_actions_api.py
curl -fsS https://cnnetmkt.top/api/base >/tmp/aios-codex-gitops-base.json
curl -fsS https://cnnetmkt.top/api/openapi-chatgpt-actions.yaml >/tmp/aios-codex-gitops-openapi.yaml
if git grep -I -E '(sk-[A-Za-z0-9_-]{20,}|SDC[A-Za-z0-9]{20,}|HPUA[A-Z0-9]{10,})' -- . ':!docs/gitops/openapi-chatgpt-actions.yaml' >/tmp/aios-codex-secret-scan.txt; then
echo 'SECRET_PATTERN_IN_GIT'
cat /tmp/aios-codex-secret-scan.txt
exit 1
fi
echo "CODEX_GITOPS_ONLINE_OK $expected"