Skip to content

Commit 6883632

Browse files
committed
test(e2e): fix CI permissions for opencode autoconnect
1 parent a1628fe commit 6883632

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

scripts/e2e/opencode-autoconnect.sh

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,14 @@
22
set -euo pipefail
33

44
RUN_ID="$(date +%s)-$RANDOM"
5-
ROOT="$(mktemp -d)"
5+
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
6+
REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
7+
ROOT_BASE="${DOCKER_GIT_E2E_ROOT_BASE:-$REPO_ROOT/.docker-git/e2e-root}"
8+
mkdir -p "$ROOT_BASE"
9+
ROOT="$(mktemp -d "$ROOT_BASE/opencode-autoconnect.XXXXXX")"
10+
# docker-git containers may `chown -R` the `.docker-git` bind mount to UID 1000.
11+
# `mktemp -d` creates 0700 dirs; if ownership changes, the host runner may lose access.
12+
chmod 0755 "$ROOT"
613
KEEP="${KEEP:-0}"
714

815
# Keep compose project/volume names unique to avoid interfering with any local docker-git state.

0 commit comments

Comments
 (0)