Просмотр исходного кода

feat: add script to download AnyKernel3 artifacts from GitHub

Add download.sh script to fetch AnyKernel3 artifacts from a specific GitHub Actions run. The script uses GitHub CLI to query and download matching artifacts based on a pattern.
TheWildJames 8 месяцев назад
Родитель
Сommit
f3a6f5d3a6
1 измененных файлов с 31 добавлено и 0 удалено
  1. 31 0
      download.sh

+ 31 - 0
download.sh

@@ -0,0 +1,31 @@
+#!/usr/bin/env bash
+set -euo pipefail
+
+# ===== CONFIG =====
+REPO="WildKernels/GKI_KernelSU_SUSFS"
+RUN_ID="20671082108"
+PATTERN="(Normal|Bypass)-AnyKernel3$"
+OUT_DIR="$HOME/gki_anykernel3"
+# ==================
+
+mkdir -p "$OUT_DIR"
+
+echo "Fetching AnyKernel3 artifacts from run $RUN_ID..."
+
+gh api \
+  repos/$REPO/actions/runs/$RUN_ID/artifacts \
+  --paginate |
+jq -r --arg pattern "$PATTERN" '
+  .artifacts[]
+  | select(.name | test($pattern))
+  | "\(.id) \(.name)"
+' |
+while read -r ID NAME; do
+  FILE="$OUT_DIR/$NAME.zip"
+  echo "Downloading: $NAME"
+  gh api \
+    repos/$REPO/actions/artifacts/$ID/zip \
+    > "$FILE"
+done
+
+echo "Done. Files saved to: $OUT_DIR"