Skip to content

Commit 8d996a6

Browse files
ci: fix bdk-jvm trigger
1 parent 68c348f commit 8d996a6

File tree

1 file changed

+19
-10
lines changed

1 file changed

+19
-10
lines changed

.github/workflows/trigger-external-bindings.yml

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,24 @@ jobs:
1313
build:
1414
runs-on: ubuntu-24.04
1515
steps:
16-
#Trigger bdk-jvm-test in bdk-jvm repository
17-
- name: Trigger bdk-jvm-test in bdk-jvm repository
16+
# Trigger trigger-bdk-jvm-test workflow in bdk-jvm repository
17+
- name: Trigger tests in bdk-jvm repository
1818
if: ${{ github.ref_name == 'master' }}
19+
env:
20+
BDK_JVM_ACCESS_TOKEN: ${{ secrets.BDK_JVM_ACCESS_TOKEN }}
1921
run: |
20-
response=$(curl -X POST \
21-
-H "Accept: application/vnd.github+json" \
22-
-H "Authorization: token ${{ secrets.BDK_JVM_ACCESS_TOKEN }}" \
23-
https://api.github.com/repos/bitcoindevkit/bdk-jvm/dispatches \
24-
-d '{"event_type":"trigger-bdk-jvm-tests"}')
25-
echo "Response: $response"
26-
echo "HTTP Status Code: $(echo $response | jq -r '.status')"
27-
echo "Response Body: $(echo $response | jq -r '.body')"
22+
curl --silent --show-error \
23+
--output /tmp/resp.txt \
24+
--write-out "HTTP Status: %{http_code}\n" \
25+
--request POST \
26+
--header "Accept: application/vnd.github+json" \
27+
--header "Content-Type: application/json" \
28+
--header "Authorization: Bearer $BDK_JVM_ACCESS_TOKEN" \
29+
--data '{"event_type":"trigger-bdk-jvm-test"}' \
30+
https://api.github.com/repos/bitcoindevkit/bdk-jvm/dispatches
31+
echo "Response body:"
32+
if [ -s /tmp/resp.txt ]; then
33+
jq . /tmp/resp.txt || cat /tmp/resp.txt
34+
else
35+
echo "(empty)"
36+
fi

0 commit comments

Comments
 (0)