Skip to content

edpichler/github-action-git-crypt

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

Unlocking a repository encrypted with Git-Crypt

This GitHub action unlocks a repository previously encrypted with Git-Crypt and then locks it again when the job finishes.

Usage

To use this action, you need a GPG key, its grip and passphrase on the secrets section of your repository.

  • GPG_KEY_GRIP = The sub key-grip
  • GPG_PRIVATE_KEY = Base64 encoded version of the private key
  • GPG_KEY_PASS = Key passphrase
  • REPOSITORY_PATH = A path to another folder, in case the repository you want to unlock is in another folder.

Here is how to get the GPG key/secrets

Example

name: Test Git-Crypt Unlock Github Action 
on: 
  push:
      branches:    
          - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v1
    - name: Git-Crypt Unlock
      uses: edpichler/github-action-git-crypt@1.0.0.170
      env: 
        GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
        GPG_KEY_GRIP: ${{ secrets.GPG_KEY_GRIP }}
        GPG_KEY_PASS: ${{ secrets.GPG_KEY_PASS }}
        REPOSITORY_PATH: my-sub-folder
    # Any actions below here will have files have been decrypted.
    # At the end, everything will be locked again.

About

GitHub action to git-crypt lock and unlock a Git repository

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Dockerfile 63.9%
  • Shell 36.1%