@@ -519,16 +519,51 @@ runs:
519
519
id : digger
520
520
shell : bash
521
521
run : |
522
+ set -euo pipefail
523
+
524
+ echo "🔧 Downloading Digger CLI..."
525
+ echo "Runner OS: ${{ runner.os }}, Arch: ${{ runner.arch }}, Action Ref: ${actionref}"
526
+
522
527
if [[ ${{ inputs.ee }} == "true" ]]; then
523
528
if [[ ${{ inputs.fips }} == "true" ]]; then
524
- curl -sL https://github.com/diggerhq/digger/releases/download/${actionref}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }}-fips -o digger
529
+ DOWNLOAD_URL=" https://github.com/diggerhq/digger/releases/download/${actionref}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }}-fips"
525
530
else
526
- curl -sL https://github.com/diggerhq/digger/releases/download/${actionref}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }} -o digger
531
+ DOWNLOAD_URL=" https://github.com/diggerhq/digger/releases/download/${actionref}/digger-ee-cli-${{ runner.os }}-${{ runner.arch }}"
527
532
fi
528
533
else
529
- curl -sL https://github.com/diggerhq/digger/releases/download/${actionref}/digger-cli-${{ runner.os }}-${{ runner.arch }} -o digger
534
+ DOWNLOAD_URL="https://github.com/diggerhq/digger/releases/download/${actionref}/digger-cli-${{ runner.os }}-${{ runner.arch }}"
535
+ fi
536
+
537
+ echo "Downloading from: $DOWNLOAD_URL"
538
+
539
+ if ! curl -sL --fail "$DOWNLOAD_URL" -o digger; then
540
+ echo "Failed to download Digger CLI from $DOWNLOAD_URL"
541
+ echo ""
542
+ echo "Possible reasons:"
543
+ echo "1. The release ${actionref} might not exist"
544
+ echo "2. Binary for ${{ runner.os }}-${{ runner.arch }} might not be available"
545
+ echo "3. Network connectivity issues"
546
+ echo ""
547
+ echo "Suggestions:"
548
+ echo "- Check if release ${actionref} exists at: https://github.com/diggerhq/digger/releases"
549
+ echo "- Verify the architecture combination is supported"
550
+ echo "- Try using a different release version"
551
+ exit 1
530
552
fi
553
+
554
+ if [[ ! -f digger || ! -s digger ]]; then
555
+ echo "Downloaded file is empty or doesn't exist"
556
+ exit 1
557
+ fi
558
+
531
559
chmod +x digger
560
+
561
+ if [[ ! -x digger ]]; then
562
+ echo "Failed to make digger executable"
563
+ exit 1
564
+ fi
565
+
566
+ echo "Successfully downloaded and prepared Digger CLI"
532
567
PATH=$PATH:$(pwd)
533
568
cd $GITHUB_WORKSPACE
534
569
digger
0 commit comments