mirror of
https://github.com/netbirdio/netbird.git
synced 2025-05-02 15:24:39 +02: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:
|
jobs:
|
||||||
test-install-script:
|
test-install-script:
|
||||||
strategy:
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
max-parallel: 2
|
max-parallel: 2
|
||||||
matrix:
|
matrix:
|
||||||
os: [ubuntu-latest, macos-latest]
|
os: [ubuntu-latest, macos-latest]
|
||||||
|
@ -33,14 +33,16 @@ get_release() {
|
|||||||
local RELEASE=$1
|
local RELEASE=$1
|
||||||
if [ "$RELEASE" = "latest" ]; then
|
if [ "$RELEASE" = "latest" ]; then
|
||||||
local TAG="latest"
|
local TAG="latest"
|
||||||
|
local URL="https://pkgs.netbird.io/releases/latest"
|
||||||
else
|
else
|
||||||
local TAG="tags/${RELEASE}"
|
local TAG="tags/${RELEASE}"
|
||||||
|
local URL="https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}"
|
||||||
fi
|
fi
|
||||||
if [ -n "$GITHUB_TOKEN" ]; then
|
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/'
|
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||||
else
|
else
|
||||||
curl -s "https://api.github.com/repos/${OWNER}/${REPO}/releases/${TAG}" \
|
curl -s "${URL}" \
|
||||||
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
| grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/'
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user