This commit is contained in:
曾志威
2026-09-15 10:35:46 +08:00
parent 9f9bacb562
commit d19f2d3ddc
+4 -2
View File
@@ -50,10 +50,12 @@ steps:
from_secret: ipfs_token
commands:
- test -n "${IPFS_API:-}" || { echo 'IPFS_API is not configured; skipping upload'; exit 0; }
- cid=$(curl --fail-with-body -sS -X POST "${IPFS_API%/}/api/v0/add?pin=true&wrap-with-directory=true" -H "Authorization: Bearer ${IPFS_TOKEN}" -F file=@agentdb-$(cat VERSION)-linux-amd64.tar.gz | tail -n 1 | sed -n 's/.*"Hash":"\([^"]*\)".*/\1/p')
- >-
cid=$(curl --fail-with-body -sS -X POST "${IPFS_API%/}/api/v0/add?pin=true&wrap-with-directory=true" -H "Authorization: Bearer ${IPFS_TOKEN}" -F file=@agentdb-$(cat VERSION)-linux-amd64.tar.gz | tail -n 1 | sed -n 's/.*"Hash":"\([^"]*\)".*/\1/p')
- test -n "$cid" && test "$cid" != "null"
- printf '%s\n' "$cid" > ipfs-cid.txt
- echo "IPFS CID: $cid"
- >-
echo "IPFS CID: $cid"
when:
event:
- tag