DEV Community

Camilo
Camilo

Posted on

1

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 :)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

Top comments (0)

Sentry image

See why 4M developers consider Sentry, “not bad.”

Fixing code doesn’t have to be the worst part of your day. Learn how Sentry can help.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay