Use non-root runner with bypassPermissions
This commit is contained in:
@@ -58,6 +58,11 @@ jobs:
|
|||||||
-d "{\"body\": \"Claude is working on this issue...\"}"
|
-d "{\"body\": \"Claude is working on this issue...\"}"
|
||||||
|
|
||||||
# Build the prompt
|
# Build the prompt
|
||||||
|
PROMPT=$(cat <<'PROMPT_EOF'
|
||||||
|
You are working on a code repository. A Gitea issue needs your attention.
|
||||||
|
PROMPT_EOF
|
||||||
|
)
|
||||||
|
|
||||||
PROMPT="You are working on the repository ${REPO}.
|
PROMPT="You are working on the repository ${REPO}.
|
||||||
A Gitea issue needs your attention:
|
A Gitea issue needs your attention:
|
||||||
|
|
||||||
@@ -74,12 +79,12 @@ jobs:
|
|||||||
|
|
||||||
You are on branch ${BRANCH}. Work in the current directory."
|
You are on branch ${BRANCH}. Work in the current directory."
|
||||||
|
|
||||||
# Run Claude Code
|
# Run Claude Code in non-interactive mode
|
||||||
claude -p "${PROMPT}" \
|
claude -p "${PROMPT}" \
|
||||||
--allowedTools "Bash,Read,Edit,Write,Glob,Grep" \
|
--allowedTools "Bash,Read,Edit,Write,Glob,Grep" \
|
||||||
--mcp-config /etc/claude/mcp-gitea.json \
|
--mcp-config /home/claude-runner/.claude/mcp-gitea.json \
|
||||||
--max-turns 50 \
|
--max-turns 50 \
|
||||||
--dangerously-skip-permissions \
|
--permission-mode bypassPermissions \
|
||||||
--output-format text > /tmp/claude-output.txt 2>&1 || true
|
--output-format text > /tmp/claude-output.txt 2>&1 || true
|
||||||
|
|
||||||
echo "=== Claude Output ==="
|
echo "=== Claude Output ==="
|
||||||
|
|||||||
Reference in New Issue
Block a user