Skip to content

Commit 029b9a3

Browse files
Update terraform release token with 1password retrieval (#260)
Signed-off-by: Peter Zhu <[email protected]>
1 parent c326dfb commit 029b9a3

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

.github/workflows/test.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,12 +117,25 @@ jobs:
117117
uses: actions/setup-go@v5
118118
with:
119119
go-version: 1.22.1
120+
- name: Load secret
121+
uses: 1password/load-secrets-action@v2
122+
with:
123+
# Export loaded secrets as environment variables
124+
export-env: true
125+
env:
126+
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
127+
GPG_PRIVATE_KEY: op://opensearch-infra-secrets/release-gpg-key/signing-subkey-private
128+
GPG_PASSPHRASE: op://opensearch-infra-secrets/release-gpg-key/passphrase
129+
GPG_FINGERPRINT: op://opensearch-infra-secrets/release-gpg-key/signing-subkey-fingerprint
130+
120131
- name: Import GPG key
121132
id: import_gpg
122133
uses: crazy-max/ghaction-import-gpg@v6
123134
with:
124-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
125-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
135+
gpg_private_key: ${{ env.GPG_PRIVATE_KEY }}
136+
passphrase: ${{ env.GPG_PASSPHRASE }}
137+
fingerprint: ${{ env.GPG_FINGERPRINT }}
138+
126139
- name: Run GoReleaser
127140
uses: goreleaser/goreleaser-action@v6
128141
with:

0 commit comments

Comments
 (0)