Skip to content
database

GitHub Action

action-commit-store

2.0.0 Latest version

action-commit-store

database

action-commit-store

action using a commit comment as a key value store

Installation

Copy and paste the following snippet into your .yml file.

              

- name: action-commit-store

uses: boredland/action-commit-store@2.0.0

Learn more about this action in boredland/action-commit-store

Choose a version

commit-store

github action that stores and retrieves data inside a git comment on a git commit.

usage

store a value

- id: set
  uses: boredland/action-commit-store@master
  with:
    storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
    key: some
    value: content

update a value

- id: update
  uses: boredland/action-commit-store@master
  with:
    storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
    key: some
    value: different content

retrieve a value

- id: get
  uses: boredland/action-commit-store@master
  with:
    storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
    key: some

store values encrypted

this encrypts the whole store using a symmetrical cipher (aes gcm).

you'll need to provide a 32 characters long secret (ex.: openssl rand -hex 16).

- id: update
  uses: boredland/action-commit-store@master
  with:
    storage-commit-sha: 13ef52e3a407d9828741990d69dded5a2b65f563
    encryption-secret: ${{ secrets.ENCRYPTION_SECRET }}
    key: some
    value: content

using the value

the action returns two values:

  • value - the content you stored
  • updated - 'true' or 'false' indicating if the step updated the value
  • encrypted - 'true' or 'false' indicating if the step encrypted the store