sliteteam / github-action-git-crypt-unlock

Github Action to unlock git-crypt secrets
MIT License
47 stars 23 forks source link

Does not work with a git-crypt key file #12

Open inspectorG4dget opened 3 years ago

inspectorG4dget commented 3 years ago

Steps to reproduce:

  1. Create the key file locally, using git-crypt export-key git-crypt-key
  2. Stash this key in an S3 bucket or other remote location of choice

This works:

steps:
  - ...
  - name: git-crypt unlock
    run: |
      git clone https://github.com/AGWA/git-crypt.git
      cd git-crypt
      make
      sudo make install
      cd ..
      rm -rf git-crypt
      git-crypt unlock git-crypt-key

This does not work

steps:
  - name: Set git-crypt key
    id: ref
    run: echo "::set-output name=git_crypt_key::$(base64 git-crypt-key)"  # or cat git-crypt-key | base64
  - name: decrypt
    uses: sliteteam/github-action-git-crypt-unlock@1.2.0
    env:
      GIT_CRYPT_KEY: ${{ steps.ref.outputs.git_crypt_key }}