@@ -13,15 +13,24 @@ jobs:
13
13
build :
14
14
runs-on : ubuntu-24.04
15
15
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
18
18
if : ${{ github.ref_name == 'master' }}
19
+ env :
20
+ BDK_JVM_ACCESS_TOKEN : ${{ secrets.BDK_JVM_ACCESS_TOKEN }}
19
21
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