File tree Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Expand file tree Collapse file tree 1 file changed +26
-4
lines changed Original file line number Diff line number Diff line change @@ -23,19 +23,41 @@ Read more on the [1Password Developer Portal](https://developer.1password.com/do
2323
2424## ✨ Quickstart
2525
26+ ### Use secrets from step output (recommended)
2627``` yml
2728on : push
2829jobs :
2930 hello-world :
3031 runs-on : ubuntu-latest
3132 steps :
32- - uses : actions/checkout@v3
33+ - uses : actions/checkout@v4
3334
3435 - name : Load secret
35- uses : 1password/load-secrets-action@v2
36+ id : load_secret
37+ uses : 1password/load-secrets-action@v3
38+ env :
39+ OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
40+ SECRET : op://app-cicd/hello-world/secret
41+
42+ - name : Print masked secret
43+ run : ' echo "Secret: ${{ steps.load_secrets.outputs.SECRET }}"'
44+ # Prints: Secret: ***
45+ ```
46+
47+ ### Export secrets as env variables
48+ ``` yml
49+ on : push
50+ jobs :
51+ hello-world :
52+ runs-on : ubuntu-latest
53+ steps :
54+ - uses : actions/checkout@v4
55+
56+ - name : Load secret
57+ id : load_secret
58+ uses : 1password/load-secrets-action@v3
3659 with :
37- # Export loaded secrets as environment variables
38- export-env : true
60+ export-env : ' true'
3961 env :
4062 OP_SERVICE_ACCOUNT_TOKEN : ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
4163 SECRET : op://app-cicd/hello-world/secret
You can’t perform that action at this time.
0 commit comments