Skip to content

Commit b877fd3

Browse files
committed
add w orkflow dispatch to nix job
1 parent a7d8ebb commit b877fd3

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

.github/workflows/update-vendor-hash.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ on:
77
- "go.sum"
88
branches:
99
- master
10+
workflow_dispatch:
1011

1112
jobs:
1213
update-vendor-hash:
@@ -26,11 +27,14 @@ jobs:
2627
2728
# Try to build and capture the expected hash from error message
2829
echo "Attempting nix build to get new vendorHash..."
29-
if output=$(nix build .#dsearch 2>&1); then
30+
if output=$(nix build .#dsearch --show-trace 2>&1); then
3031
echo "Build succeeded, no hash update needed"
3132
exit 0
3233
fi
3334
35+
echo "Build failed. Output:"
36+
echo "$output"
37+
3438
# Extract the expected hash from the error message
3539
new_hash=$(echo "$output" | grep -oP "got:\s+\K\S+" | head -n1)
3640
@@ -57,7 +61,7 @@ jobs:
5761
5862
# Verify the build works with the new hash
5963
echo "Verifying build with new vendorHash..."
60-
nix build .#dsearch
64+
nix build .#dsearch --show-trace
6165
6266
echo "vendorHash updated successfully!"
6367

0 commit comments

Comments
 (0)