mirror of
https://github.com/netbirdio/netbird.git
synced 2025-01-11 16:38:27 +01:00
Use the pkgs to get the latest version (#2682)
* Use the pkgs to get the latest version * disable fail fast
This commit is contained in:
parent
5932298ce0
commit
a3a479429e
1
.github/workflows/install-script-test.yml
vendored
1
.github/workflows/install-script-test.yml
vendored
@ -13,6 +13,7 @@ concurrency:
|
||||
jobs:
|
||||
test-install-script:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
max-parallel: 2
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
|
@ -33,14 +33,16 @@ get_release() {
|
||||
local RELEASE=$1
|
||||
if [ "$RELEASE" = "latest" ]; then
|
||||
local TAG="latest"
|
||||
local URL="https://pkgs.netbird.io/releases/latest"
|
||||
else
|
||||
local TAG="tags/${RELEASE}"
|
||||
local URL="https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}"
|
||||
fi
|
||||
if [ -n "$GITHUB_TOKEN" ]; then
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s "https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}" \
|
||||
curl -H "Authorization: token ${GITHUB_TOKEN}" -s "${URL}" \
|
||||
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||
else
|
||||
curl -s "https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}" \
|
||||
curl -s "${URL}" \
|
||||
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||
fi
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user