Merge pull request #114 from 1Password/vzt/change-default-export-env
Set `export-env` input to `false` by default
This commit is contained in:
28
README.md
28
README.md
@@ -23,16 +23,40 @@ Read more on the [1Password Developer Portal](https://developer.1password.com/do
|
|||||||
|
|
||||||
## ✨ Quickstart
|
## ✨ Quickstart
|
||||||
|
|
||||||
|
### Export secrets as a step's output (recommended)
|
||||||
|
|
||||||
```yml
|
```yml
|
||||||
on: push
|
on: push
|
||||||
jobs:
|
jobs:
|
||||||
hello-world:
|
hello-world:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Load secret
|
- name: Load secret
|
||||||
uses: 1password/load-secrets-action@v2
|
id: load_secret
|
||||||
|
uses: 1password/load-secrets-action@v3
|
||||||
|
env:
|
||||||
|
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
|
||||||
|
SECRET: op://app-cicd/hello-world/secret
|
||||||
|
|
||||||
|
- name: Print masked secret
|
||||||
|
run: 'echo "Secret: ${{ steps.load_secrets.outputs.SECRET }}"'
|
||||||
|
# Prints: Secret: ***
|
||||||
|
```
|
||||||
|
|
||||||
|
### Export secrets as env variables
|
||||||
|
|
||||||
|
```yml
|
||||||
|
on: push
|
||||||
|
jobs:
|
||||||
|
hello-world:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Load secret
|
||||||
|
uses: 1password/load-secrets-action@v3
|
||||||
with:
|
with:
|
||||||
# Export loaded secrets as environment variables
|
# Export loaded secrets as environment variables
|
||||||
export-env: true
|
export-env: true
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ inputs:
|
|||||||
default: "false"
|
default: "false"
|
||||||
export-env:
|
export-env:
|
||||||
description: Export the secrets as environment variables
|
description: Export the secrets as environment variables
|
||||||
default: "true"
|
default: "false"
|
||||||
version:
|
version:
|
||||||
description: Specify which 1Password CLI version to install. Defaults to "latest".
|
description: Specify which 1Password CLI version to install. Defaults to "latest".
|
||||||
default: "latest"
|
default: "latest"
|
||||||
|
|||||||
Reference in New Issue
Block a user