Skip to content

proyecto-chaucha/chaucha-gha-opreturn

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

Chaucha Commit Notarization

Using Chaucha blockchain, commits can be certified using OP_RETURN. Now Github history can be notarized.

OP_RETURN

OP_RETURN in Explorer

OP_RETURN Decoded

Usage

Using a mixture of OP_RETURN and Git Notes we can notarize each commit.

Example workflow

name: Integration Test
on: [push]
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - name: Self test
        id: selftest

        uses: proyecto-chaucha/chaucha-gha-opreturn@master
        with:
          privkey: "${{secrets.PRIVKEY}}"
          pubkey: "${{secrets.PUBKEY}}"
          sendkey: "${{secrets.SENDKEY}}"
          message: "repo: ${{github.repository}};branch: ${{github.ref}};commit: ${{github.sha}}"

      # Save certification using git-notes
      - run: |
          git config user.name "$GITHUB_ACTOR"
          git config user.email "[email protected]"
          git fetch origin "refs/notes/*:refs/notes/*"
          git notes append -m "repo: $GITHUB_REPOSITORY ; branch: $GITHUB_REF ; commit: $GITHUB_SHA ; tx: ${{steps.selftest.outputs.response}}"
          git push origin "refs/notes/*"

Inputs

Input Description
privkey Private Key to sign transaction. Use PRIVKEY in Github Secrets.
pubkey Public key of the Private key to verify confirmations. Use PUBKEY in Github Secrets.
sendkey Public key to send the transaction. Use SENDKEY in Github Secrets.
message Message to send with OP_RETURN. Max 255 chars.

Outputs

Output Description
response Response with the OP_RETURN result message