Skip to content

Commit

Permalink
chore: Download assets using gh release download
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Jul 28, 2024
1 parent 2f8b385 commit 453f606
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,19 +55,19 @@ runs:
echo "Installing kubedb $VERSION..."
DEST="$RUNNER_TEMP/kubedb"
URL="$(jq -r --arg OS "$OS" \
'.assets[] | select(.name | ascii_downcase | test($OS + "_(amd64|x86_64).(tar.gz|zip)$")) | .url' \
ASSET="$(jq -r --arg OS "$OS" \
'.assets[].name | select(ascii_downcase | test($OS + "_(amd64|x86_64).(tar.gz|zip)$"))' \
<<<"$RELEASE" \
)"
echo "Downloading $URL"
echo "Downloading $ASSET"
mkdir -p "$DEST"
cd "$DEST"
case "$URL" in
case "$ASSET" in
*.tar.gz)
curl -sfL "$URL" | tar -xzf - "$FILENAME";;
gh release download "$VERSION" --pattern="$ASSET" --output=- | tar -xzf - "$FILENAME" ;;
*.zip)
curl -sfL -o app.zip "$URL"
gh release download "$VERSION" --pattern="$ASSET"
unzip app.zip "$FILENAME"
rm app.zip
;;
Expand Down

0 comments on commit 453f606

Please sign in to comment.