Skip to content

Commit 558fa8f

Browse files
committed
fix: use local clone instead of npm install -g for CI reliability
1 parent 5f4d576 commit 558fa8f

1 file changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/pr-review.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,21 @@ jobs:
2727
- name: Install pi-relay
2828
id: relay
2929
run: |
30-
npm install -g github:benaiad/pi-relay
31-
echo "plan_dir=$(npm root -g)/pi-relay/bundled/ci" >> "$GITHUB_OUTPUT"
30+
git clone --depth=1 https://github.com/benaiad/pi-relay.git /tmp/pi-relay
31+
cd /tmp/pi-relay && npm ci && npm run build
32+
echo "root=/tmp/pi-relay" >> "$GITHUB_OUTPUT"
3233
3334
- name: Run PR review
3435
run: |
35-
relay bundled/ci/pr-review.md \
36+
node ${{ steps.relay.outputs.root }}/dist/cli/main.js \
37+
bundled/ci/pr-review.md \
3638
-e pr_number="${{ github.event.pull_request.number }}" \
3739
--model "$RELAY_MODEL" \
3840
--thinking "${RELAY_THINKING:-off}"
3941
env:
4042
RELAY_MODEL: ${{ secrets.RELAY_MODEL }}
4143
RELAY_THINKING: ${{ secrets.RELAY_THINKING }}
42-
RELAY_PLAN_DIR: ${{ steps.relay.outputs.plan_dir }}
44+
RELAY_PLAN_DIR: ${{ steps.relay.outputs.root }}/bundled/ci
4345
GH_TOKEN: ${{ github.token }}
4446
# Add your provider's API key secret below. Name depends on provider:
4547
# zai → ZAI_API_KEY, anthropic → ANTHROPIC_API_KEY, openai → OPENAI_API_KEY

0 commit comments

Comments
 (0)