[go: up one dir, main page]

DEV Community

Camilo
Camilo

Posted on

Github Action: Commit Notarization

My Workflow

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

Submission Category:

Wacky Wildcards

Yaml File or Link to Code

GitHub logo proyecto-chaucha / chaucha-gha-opreturn

A simple Github Action to use OP_RETURN in Chaucha network

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 "$GITHUB_ACTOR@users.noreply.github.com"
          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/*"
Enter fullscreen mode Exit fullscreen mode

Inputs

Input Description
privkey Private Key to sign transaction. Use PRIVKEY in Github Secrets.
pubkey Public key of

Additional Resources / Info

https://chaucha.cl

Note: Maybe this sumission is late, but anyway :)

Top comments (0)