From 8ea41ec3d7bb5a7041d4e58d02b4b3844a04302b Mon Sep 17 00:00:00 2001 From: M4K3R Date: Fri, 20 Nov 2026 22:42:09 +0800 Subject: [PATCH] ci: drop Pinata pin, make pin steps independent Remove the Pinata pin-by-CID step (free plan has no pin-by-CID; owner dropped the service). Give the 4EVERLAND and Filebase pin steps ids and continue-on-error so one failing pin no longer skips the other, and add a final gate step that fails the deploy job if either pin outcome is not success. --- .github/workflows/ci.yml | 44 +++++++++++++++++----------------------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbe5d3b..9779ba1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -187,6 +187,8 @@ jobs: echo "Site available at: https://xav.gwei.site" - name: Pin to 4EVERLand + id: pin-4everland + continue-on-error: true env: PIN_4EVER_TOKEN: ${{ secrets.PIN_4EVER_TOKEN }} run: | @@ -254,32 +256,9 @@ jobs: echo "⚠️ TIMEOUT: Pin did not reach 'pinned' status within 60 seconds" exit 1 - - name: Pin to Pinata - env: - PINATA_JWT: ${{ secrets.PINATA_JWT }} - PINATA_CID: ${{ steps.deploy.outputs.cid }} - run: | - RESP=$(curl --silent --show-error --write-out '\n%{http_code}' \ - --request POST \ - --url https://api.pinata.cloud/v3/files/public/pin_by_cid \ - --header "authorization: Bearer ${PINATA_JWT}" \ - --header "content-type: application/json" \ - --data "{\"cid\": \"${PINATA_CID}\", \"name\": \"site\"}") - - HTTP_CODE=$(echo "$RESP" | tail -n1) - BODY=$(echo "$RESP" | sed '$d') - - echo "Pinata pin-by-CID response (HTTP $HTTP_CODE):" - echo "$BODY" - - if [ "$HTTP_CODE" != "200" ]; then - echo "❌ Pinata pin failed with HTTP $HTTP_CODE" - exit 1 - fi - - echo "✅ Pin accepted by Pinata (CID: ${PINATA_CID})" - - name: Pin to Filebase + id: pin-filebase + continue-on-error: true env: # Filebase IPFS Pinning Service API auth: a per-bucket Secret Access # Token (Bearer). @@ -363,3 +342,18 @@ jobs: echo "⚠️ TIMEOUT: Pin did not reach 'pinned' status within 60 seconds" exit 1 + + - name: Check pin results + if: always() + env: + EVERLAND_OUTCOME: ${{ steps.pin-4everland.outcome }} + FILEBASE_OUTCOME: ${{ steps.pin-filebase.outcome }} + run: | + echo "4EVERLAND: ${EVERLAND_OUTCOME} / Filebase: ${FILEBASE_OUTCOME}" + + if [ "${EVERLAND_OUTCOME}" != "success" ] || [ "${FILEBASE_OUTCOME}" != "success" ]; then + echo "❌ One or more pin steps failed" + exit 1 + fi + + echo "✅ All pins succeeded"