Fixed release.yml due to false product
All checks were successful
release-tag / release-image (push) Successful in 2m5s
All checks were successful
release-tag / release-image (push) Successful in 2m5s
This commit is contained in:
@@ -166,8 +166,7 @@ jobs:
|
||||
|
||||
publish() { # args: OS ARCH FILE
|
||||
local OS="$1" ARCH="$2" FILE="$3"
|
||||
local BIT="64"
|
||||
case "$ARCH" in 386|armv7) BIT="32";; esac
|
||||
local BIT="64"; case "$ARCH" in 386|armv7) BIT="32";; esac
|
||||
|
||||
local FNAME="$(basename "$FILE")"
|
||||
local URL="${SERVER_URL}/${REPOSITORY}/releases/download/${TAG}/${FNAME}"
|
||||
@@ -177,6 +176,7 @@ jobs:
|
||||
SIZE="$(stat -c%s "$FILE")"
|
||||
|
||||
jq -n \
|
||||
--arg product "$PRODUCT" \
|
||||
--arg branch "$BRANCH" \
|
||||
--arg channel "$CHANNEL" \
|
||||
--arg arch "$ARCH" \
|
||||
@@ -189,18 +189,20 @@ jobs:
|
||||
--arg sha256 "$SHA256" \
|
||||
--argjson size "$SIZE" \
|
||||
'{
|
||||
product:$product,
|
||||
branch:$branch, channel:$channel, arch:$arch, bit:$bit, os:$os,
|
||||
release:{
|
||||
version:$version, released_at:$released_at, notes_url:$notes,
|
||||
assets:[{url:$url, sha256:$sha256, size_bytes:$size}]
|
||||
}
|
||||
}' > payload.json
|
||||
echo @payload.json
|
||||
|
||||
curl -fsS -H "Content-Type: application/json" \
|
||||
-H "Authorization: Bearer ${AGENT_TOKEN}" \
|
||||
-d @payload.json "${AGENT_URL}/v1/publish"
|
||||
}
|
||||
|
||||
|
||||
shopt -s nullglob
|
||||
|
||||
# linux/amd64
|
||||
|
||||
Reference in New Issue
Block a user