How to load a json?
Question as title, Im trying to put a json in 1password and load it in CI. but what I see is the result removes " in the object and cause parsing error
Hi, I'm trying to achieve the same thing. Did you find a good way to do it? Can you share your approach?
Thanks 🙏
Hi, I'm trying to achieve the same thing. Did you find a good way to do it? Can you share your approach?
Thanks 🙏
Nope, i dont load json in 1password now
@himself65 Hey. Could you please give more details about your use case? What kind of item is that Login, Document? Are you reading json from attached file or other field?
I stumbled upon this today with a secret containing a line similar to this:
SOME_SERVICE_NODES='["https://my-node1","https://my-node2","https://my-node3"]'
I was able to solve it by passing the secret as an environment variable into my step like so:
- name: Load Secrets
id: load_secrets
uses: 1password/load-secrets-action@v3
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SECRET_LINE: "op://My Secrets Vault/Some Secret/value"
- name: Output Secret
env:
SECRET: ${{ steps.load_secrets.outputs.SECRET_LINE }}
run: |
echo "$SECRET" > some.env