Record preview synchronization and runtime identity
Unified application CI and deployment / static-checks (push) Successful in 6s
Remote development preview source sync / sync-source (push) Successful in 7s
Unified application CI and deployment / static-checks (pull_request) Successful in 5s
python CI and deployment / static-checks (pull_request) Successful in 3s
Unified application CI and deployment / verify-and-release (push) Has been skipped
Unified application CI and deployment / verify-and-release (pull_request) Has been skipped
python CI and deployment / verify-and-deploy (pull_request) Has been skipped

This commit is contained in:
2026-11-04 14:34:45 +08:00
parent 1df5790d23
commit 896c8bb9e5
3 changed files with 12 additions and 2 deletions
+3 -1
View File
@@ -5,6 +5,7 @@ SHA=${2:?commit SHA required}
BRANCH=${3:?branch required}
[[ "$SHA" =~ ^[0-9a-f]{40}$ ]] || exit 2
ROOT=/opt/prompt-preview
started=$SECONDS
exec 8>/var/lock/prompt-preview-sync.lock
flock -w 30 8
latest=$(git -C "$SOURCE" ls-remote origin "refs/heads/$BRANCH" | cut -f1)
@@ -44,4 +45,5 @@ temporary.write_text(json.dumps({'sha':os.environ['SHA'],'branch':os.environ['BR
temporary.chmod(0o644)
temporary.replace(destination)
META
echo "Preview synchronized: $BRANCH $SHA (container $id)"
container_started=$(docker inspect --format '{{.State.StartedAt}}' "$id")
echo "Preview synchronized: $BRANCH $SHA (container $id, started $container_started, sync ${SECONDS}s)"