Skip to content

ci: pin to Pinata via CAR upload and decouple pin services - #43

Closed
AI-M4K3R wants to merge 1 commit into
mainfrom
fix/pinata-car-upload
Closed

AI-M4K3R wants to merge 1 commit into
mainfrom
fix/pinata-car-upload

Conversation

@AI-M4K3R

Copy link
Copy Markdown
Collaborator

Cause

The Pin to Pinata step called POST https://api.pinata.cloud/v3/files/public/pin_by_cid, which returns HTTP 403 This feature is not supported by the current plan type on the Pinata free plan, so the Pinata pin never landed and the failing step also skipped Pin to Filebase.

Fix

  • Pinata now uses the V3 Files API CAR upload (POST https://uploads.pinata.cloud/v3/files, multipart, network=public, file=@<CAR>, name=site, car=true): car=true makes Pinata unpack the CAR server-side and pin the contained root CID, so the deterministic CID computed by ipfs-deploy-action is preserved — this is the method in the action's official Pinata recipe. The step verifies that data.cid in the response matches the deploy CID and fails loudly otherwise.
  • Pin steps are decoupled: Pin to 4EVERLand, Pin to Pinata and Pin to Filebase each got an id + continue-on-error: true, and a final Verify pin results step (if: always()) fails the job if ANY pin outcome was not success. One service failing no longer skips the others.

Caveat found during research

Pinata's docs currently state that CAR uploads are a paid-plan feature ("Paid plan required - CAR uploads are not available on free plans", docs.pinata.cloud/files/uploading-files). Combined with the 403 on pin_by_cid, this means the free plan has no API method that preserves the root CID (a plain file upload of the CAR would produce the CAR file's own CID, not the site's). This PR implements the correct CID-preserving endpoint — it will succeed as soon as the Pinata plan allows it, and until then it fails loudly with a clear error while Filebase/4EVERLAND pins now complete regardless.

pin_by_cid returns 403 on the Pinata free plan ('This feature is not
supported by the current plan type'). Switch to the V3 Files API CAR
upload (POST https://uploads.pinata.cloud/v3/files with car=true),
which unpacks the CAR server-side and pins the contained root CID,
preserving the deterministic CID computed by ipfs-deploy-action. The
returned CID is checked against the deploy CID and mismatches fail.

Give each pin step continue-on-error plus an id so one pin service
failing no longer skips the others, and add a final 'Verify pin
results' step that fails the job if any pin outcome was not success.
@AI-M4K3R
AI-M4K3R marked this pull request as ready for review November 20, 2026 14:31
@AI-M4K3R
AI-M4K3R requested a review from nipsysdev November 20, 2026 14:31
@AI-M4K3R

Copy link
Copy Markdown
Collaborator Author

Closing as redundant: PR #44 was merged and already covers everything this PR did. Its Pinata CAR-upload fix targeted the pin step that #44 deleted, and the pin-service decoupling/verify pattern it introduced is already on main. Nothing here to merge. Branch fix/pinata-car-upload is being kept.

@AI-M4K3R AI-M4K3R closed this Nov 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant