mirror of
https://github.com/kubescape/kubescape.git
synced 2026-04-15 06:58:11 +00:00
support os types
This commit is contained in:
@@ -5,6 +5,7 @@ on:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
types: [ closed ]
|
||||
|
||||
jobs:
|
||||
once:
|
||||
|
||||
+10
-2
@@ -7,10 +7,18 @@ echo
|
||||
BASE_DIR=~/.kubescape
|
||||
KUBESCAPE_EXEC=kubescape
|
||||
|
||||
# GITHUB_OWNER=$(git config --get remote.origin.url | grep -Po "(?<=github\.com:)(.*?)(?=/.*)")
|
||||
osName=$(uname -s)
|
||||
if [[ $osName == *"MINGW"* ]]; then
|
||||
osName=windows-latest
|
||||
elif [[ $osName == *"Darwin"* ]]; then
|
||||
osName=macos-latest
|
||||
else
|
||||
osName=ubuntu-latest
|
||||
fi
|
||||
|
||||
GITHUB_OWNER=armosec
|
||||
|
||||
DOWNLOAD_URL=$(curl --silent "https://api.github.com/repos/$GITHUB_OWNER/kubescape/releases/latest" | grep -o "browser_download_url.*")
|
||||
DOWNLOAD_URL=$(curl --silent "https://api.github.com/repos/$GITHUB_OWNER/kubescape/releases/latest" | grep -o "browser_download_url.*${osName}.*")
|
||||
DOWNLOAD_URL=${DOWNLOAD_URL//\"}
|
||||
DOWNLOAD_URL=${DOWNLOAD_URL/browser_download_url: /}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user