Git Product home page Git Product logo

git-secret-action's Introduction

git-secret GitHub Action

A GitHub action to setup git-secret and reveal secrets in a repository.

Usage

Use simbo/git-secret-action@v1 in your GitHub action workflow.

Example

jobs:
  ci:
    runs-on: ubuntu-latest
    steps:
      - name: ๐Ÿ›Ž Checkout
        uses: actions/checkout@v3

      - name: ๐Ÿ”“ Reveal Secrets
        uses: simbo/git-secret-action@v1
        with:
          private-key: ${{ secrets.GPG_PRIVATE_KEY }}
          passphrase: ${{ secrets.GPG_PASSPHRASE }}

Inputs

Input Required Default Description
version no (latest) git-secret version to use
private-key yes โ€“ base64-encoded single-line gpg private key to decrypt secrets
passphrase yes โ€“ gpg passphrase to decrypt secrets
github-com-pat no โ€“ GitHub.com PAT to retrieve latest git-secret version number from GitHub API (recommended for GitHub Enterprise environments)

Providing a GPG Private Key

A GPG private key is a large multi-line string. To enable GitHub Actions to work with this, it should be converted to a base64-encoded single-line string.

The following command willโ€ฆ

  • export the private key for <EMAIL>
  • encode it with base64
  • convert it to a single-line string
  • save it as private_key.txt
gpg --armour --export-secret-keys <EMAIL> | base64 | tr -d '\n' > private_key.txt

Store the generated string as GitHub Actions secret.

Outputs

This action has no outputs. ๐Ÿคทโ€โ™‚๏ธ

Development

Creating a new Version

Use ./release.sh <major|minor|patch> which will create a git tag for the respective version.

A release workflow will pick up the tag when pushed to GitHub, create a release and move major, minor and latest tags accordingly.

To publish the release into the GitHub marketplace open releases and update the release for marketplace publishing.

License

MIT ยฉ Simon Lepel

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.