Skip to content

Commit 438a012

Browse files
Merge pull request #114 from 1Password/vzt/change-default-export-env
Set `export-env` input to `false` by default
2 parents 7914f19 + ba891d4 commit 438a012

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

README.md

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,40 @@ Read more on the [1Password Developer Portal](https://developer.1password.com/do
2323

2424
## ✨ Quickstart
2525

26+
### Export secrets as a step's output (recommended)
27+
28+
```yml
29+
on: push
30+
jobs:
31+
hello-world:
32+
runs-on: ubuntu-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- name: Load secret
37+
id: load_secret
38+
uses: 1password/load-secrets-action@v3
39+
env:
40+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
41+
SECRET: op://app-cicd/hello-world/secret
42+
43+
- name: Print masked secret
44+
run: 'echo "Secret: ${{ steps.load_secrets.outputs.SECRET }}"'
45+
# Prints: Secret: ***
46+
```
47+
48+
### Export secrets as env variables
49+
2650
```yml
2751
on: push
2852
jobs:
2953
hello-world:
3054
runs-on: ubuntu-latest
3155
steps:
32-
- uses: actions/checkout@v3
56+
- uses: actions/checkout@v4
3357

3458
- name: Load secret
35-
uses: 1password/load-secrets-action@v2
59+
uses: 1password/load-secrets-action@v3
3660
with:
3761
# Export loaded secrets as environment variables
3862
export-env: true

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ inputs:
1010
default: "false"
1111
export-env:
1212
description: Export the secrets as environment variables
13-
default: "true"
13+
default: "false"
1414
version:
1515
description: Specify which 1Password CLI version to install. Defaults to "latest".
1616
default: "latest"

0 commit comments

Comments
 (0)