Host smoke: build bundle when artifact missing

This commit is contained in:
andrussal 2025-12-09 18:19:19 +01:00
parent 2c54c17239
commit 06bc15e29e

View File

@ -227,8 +227,9 @@ jobs:
artifact_id=$(gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts" --paginate -F per_page=100 \
--jq '.artifacts[] | select(.name=="'"${ARTIFACT_NAME}"'") | .id' | head -n1)
if [ -z "$artifact_id" ]; then
echo "Nomos binaries artifact ${ARTIFACT_NAME} not found. Run build-binaries workflow." >&2
exit 1
echo "Nomos binaries artifact ${ARTIFACT_NAME} not found; building host bundle locally."
./scripts/build-bundle.sh --platform host --output "${GITHUB_WORKSPACE}/.tmp/nomos-binaries-host-${VERSION}.tar.gz"
exit 0
fi
gh api -X GET "repos/${GITHUB_REPOSITORY}/actions/artifacts/${artifact_id}/zip" > "${TMPDIR}/nomos-binaries.zip"
unzip -o "${TMPDIR}/nomos-binaries.zip" -d "${TMPDIR}"