Skip to content

Timestamp your Git commits using the Arweave permaweb.

License

Notifications You must be signed in to change notification settings

weavery/gitstamp-action

Repository files navigation

Gitstamp for GitHub Actions

Project license Gitstamp Discord

This is a GitHub Action for timestamping your Git commits using the Arweave permaweb.

By adding this action to your GitHub repository, the SHA-1 commit hash and commit metadata of your latest commit will get permanently and uncensorably timestamped on Arweave every time you push to the repository.

This makes it easy to prove to any third party that a particular commit was created no later than the time when it was timestamped on Arweave.

Sample

The Git commit metadata is recorded on the blockweave as follows:

Screenshot of Gitstamp metadata

See the Gitstamp specification for more particulars.

Usage

Once you are set up with an Arweave wallet, using this action in your GitHub project is straightforward:

.github/workflows/gitstamp.yaml

Paste the following into a .github/workflows/gitstamp.yaml file in your GitHub repository:

---
name: Gitstamp
on: [push]
jobs:
  gitstamp:
    runs-on: ubuntu-latest
    name: Timestamp commit with Gitstamp
    steps:
      - name: Clone repository
        uses: actions/checkout@v2
      - name: Submit Gitstamp transaction
        uses: weavery/gitstamp-action@v1
        with:
          wallet-key: ${{ secrets.GITSTAMP_KEYFILE }}
          commit-link: true

Repository secrets

Add the contents of an Arweave wallet key file to a GitHub repository secret. The secret can be named anything you like, but we suggest GITSTAMP_KEYFILE to match the workflow file above.

Costs

Each Arweave transaction requires an enclosed transaction fee to pay for transaction processing and permanent storage on the Arweave network. In practice, this works out to less than USD$0.00001 per timestamped commit. (In other words, a USD$1 wallet will suffice for at least 100,000 commits.)

This fee is deducted from the wallet configured in the repository secrets.

Dependencies

Inputs

wallet-key

The Arweave wallet key to use for signing transactions and paying transaction fees.

commit-link

A boolean indicating whether to include a GitHub commit link. Defaults to false for privacy reasons.

Outputs

transaction-id

The Arweave transaction ID.

For example, guSFLDoc3dvdeZg-fBCp6uLeLHb_gGLCW__eefqtHM0.

transaction-link

The Arweave transaction explorer link on ViewBlock.io.

For example, https://viewblock.io/arweave/tx/guSFLDoc3dvdeZg-fBCp6uLeLHb_gGLCW__eefqtHM0.

response-code

The Arweave HTTP API response status code.

response-text

The Arweave HTTP API response status text.

See Also

This repository is mirrored on GitHub, GitLab, and Bitbucket.