Automatic IPFS pinning of GitHub repository archives/tarballs/zips

It is very convenient to just use direct GitHub links for some dependencies, as is commonly done with nix.

One unfortunate consequence of this is that if you or someone else forks a repo in order to change something, you either have to directly depend on that fork, or you have to wait for your PR to get merged.

If the fork later gets deleted, likely due to the change being merged, then any code that references the fork will break. Even without the forking aspect it is always possible that an original repo gets deleted for some other reason.

This seems like a very clear use-case for IPFS. Ideally instead of getting an archive link like https://github.com/<user>/<repo>/archive/${rev}.tar.gz, you would get an IPFS file link instead, and even the CID of the IPLD git-raw object.

However right now doing this requires managing all of the hashing and pinning yourself, which in practice is too inconvenient for just about anyone to bother.

The ideal way to support this would be to get GitHub themselves to directly support it, by pinning commits automatically and providing IPFS links in the UI (perhaps also via their own gateway). I have asked GitHub support in the past but not much came of it.

Alternatively there are some other things that can be done to improve this situation. For example GitHub actions that will do this for you. Another option would be to convince a GitHub competitor to support this, particularly if they also support automatically mirroring changes to GitHub repos.