Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

fix(ci): reorder setup before PR branch checkout (#1276)

worktrunk-bote2cc724c02a3
diff --git a/.github/workflows/claude-mention.yaml b/.github/workflows/claude-mention.yaml
index 767771105..a44ee5d80 100644
--- a/.github/workflows/claude-mention.yaml
+++ b/.github/workflows/claude-mention.yaml
@@ -126,6 +126,12 @@ jobs:
COMMENT_ID: ${{ github.event.comment.id }}
GH_TOKEN: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
+ # Setup build tools BEFORE checking out PR branch β€” the composite action
+ # lives on main and won't exist on PR branches created before #1273.
+ - name: πŸ”§ Setup build tools
+ if: steps.verify.outcome != 'failure'
+ uses: ./.github/actions/claude-setup
+
- name: πŸ“Œ Check out PR branch (conversation comment)
if: steps.verify.outcome != 'failure' && github.event.issue.pull_request
run: |
@@ -150,9 +156,6 @@ jobs:
env:
GH_TOKEN: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
- - name: πŸ”§ Setup build tools
- uses: ./.github/actions/claude-setup
-
- name: πŸ€– Run Claude Code
if: steps.verify.outcome != 'failure'
id: claude
diff --git a/.github/workflows/claude-review.yaml b/.github/workflows/claude-review.yaml
index a9c7e85c1..06401a093 100644
--- a/.github/workflows/claude-review.yaml
+++ b/.github/workflows/claude-review.yaml
@@ -54,16 +54,18 @@ jobs:
fetch-tags: true
token: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
+ # Setup build tools BEFORE checking out PR branch β€” the composite action
+ # lives on main and won't exist on PR branches created before #1273.
+ - name: πŸ”§ Setup build tools
+ if: github.event_name == 'pull_request_review'
+ uses: ./.github/actions/claude-setup
+
- name: πŸ“Œ Check out PR branch
if: github.event_name == 'pull_request_review'
run: gh pr checkout ${{ github.event.pull_request.number }}
env:
GH_TOKEN: ${{ secrets.WORKTRUNK_BOT_TOKEN }}
- - name: πŸ”§ Setup build tools
- if: github.event_name == 'pull_request_review'
- uses: ./.github/actions/claude-setup
-
- name: πŸ€– Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1