Skip to content

Commit fd86ee4

Browse files
joostjagerclaude
andcommitted
Allow overriding ldk-node fork/branch from PR description
Parse the PR body for a `ldk-node: owner/repo#branch` line and use it to check out a custom fork/branch for the integration test. Falls back to `lightningdevkit/ldk-node` at its default branch when not specified or on push events. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent fc8350a commit fd86ee4

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ldk-node-integration.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,22 @@ jobs:
1515
uses: actions/checkout@v3
1616
with:
1717
path: rust-lightning
18+
- name: Determine LDK Node repo and branch
19+
id: ldk-node-ref
20+
if: github.event_name == 'pull_request'
21+
env:
22+
PR_BODY: ${{ github.event.pull_request.body }}
23+
run: |
24+
LDK_NODE_REF=$(echo "$PR_BODY" | sed -n 's/^[[:space:]]*ldk-node:[[:space:]]*//p' | tr -d '[:space:]')
25+
if [ -n "$LDK_NODE_REF" ]; then
26+
echo "repo=$(echo "$LDK_NODE_REF" | cut -d'#' -f1)" >> "$GITHUB_OUTPUT"
27+
echo "ref=$(echo "$LDK_NODE_REF" | cut -d'#' -s -f2)" >> "$GITHUB_OUTPUT"
28+
fi
1829
- name: Checkout LDK Node
1930
uses: actions/checkout@v3
2031
with:
21-
repository: lightningdevkit/ldk-node
32+
repository: ${{ steps.ldk-node-ref.outputs.repo || 'lightningdevkit/ldk-node' }}
33+
ref: ${{ steps.ldk-node-ref.outputs.ref || '' }}
2234
path: ldk-node
2335
- name: Install Rust stable toolchain
2436
run: |

0 commit comments

Comments
 (0)