load-secrets-action icon indicating copy to clipboard operation
load-secrets-action copied to clipboard

Add ability to inject entire secret to environment

Open tomjohnburton opened this issue 2 years ago • 3 comments

Instead of specifying each secret individually, I would love to be able to just reference the vault and secret, and the action creates all the env vars.

For example:

on: push
jobs:
  hello-world:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2

      - name: Load secret
        uses: 1password/load-secrets-action@v1
        with:
          inject_all: true
        env:
          OP_CONNECT_HOST: <Your Connect instance URL>
          OP_CONNECT_TOKEN: ${{ secrets.OP_CONNECT_TOKEN }}
          _: op://app-cicd/hello-world
$ env
A=123
B=234
C=456
...

tomjohnburton avatar Jun 16 '22 17:06 tomjohnburton

Hi @tomjohnburton - thanks for reaching out and for this suggestion. We can't commit to any timeline for this particular feature/enhancement request, but I can confirm that we have tracked it internally.

dustin-ruetz avatar May 26 '23 19:05 dustin-ruetz

Need this, currently there's no way to export my 36 environment variables secrets without typing them all for each project, even with the new install-cli-action using 1Password CLI without saving it as a note.

lltr avatar Oct 01 '23 07:10 lltr

I built exactly for that my own action: https://github.com/shyim/1password-load-secrets-action

shyim avatar Nov 28 '23 21:11 shyim