Use op cli alpha v2

This commit is contained in:
Eddy Filip
2021-09-01 16:20:47 +02:00
parent 5add51bcb8
commit e8da10d005
2 changed files with 8 additions and 18 deletions

View File

@@ -20,13 +20,9 @@ jobs:
- name: Load secrets
uses: ./ # 1password/load-secrets-action@<version>
env:
SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/password
SECRET_IN_SECTION: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/test-section/password
UNMASKED_VALUE: op://v5pz6venw4roosmkzdq2nhpv6u/hrgkzhrlvscomepxlgafb2m3ca/test-section/username
- name: Load multiline secret
uses: ./ # 1password/load-secrets-action@<version>
env:
MULTILINE_SECRET: op://v5pz6venw4roosmkzdq2nhpv6u/ghtz3jvcc6dqmzc53d3r3eskge/notesPlain
SECRET: op://acceptance-tests/test-secret/password
SECRET_IN_SECTION: op://acceptance-tests/test-secret/test-section/password
MULTILINE_SECRET: op://acceptance-tests/multiline-secret/notesPlain
- name: Print environment variables with masked secrets
run: printenv
- name: Assert test secret values
@@ -39,13 +35,3 @@ jobs:
run: printenv
- name: Assert removed secrets
run: ./tests/assert-env-unset.sh
- name: Load secrets by vault and item titles
uses: ./ # 1password/load-secrets-action@<version>
env:
SECRET: op://acceptance-tests/test-secret/password
SECRET_IN_SECTION: op://acceptance-tests/test-secret/test-section/password
MULTILINE_SECRET: op://acceptance-tests/multiline-secret/notesPlain
- name: Print environment variables with masked secrets
run: printenv
- name: Assert test secret values again
run: ./tests/assert-env-set.sh

View File

@@ -3,7 +3,11 @@
set -e
# Install op-cli
curl -sSfLo op.zip "https://drive.google.com/uc?export=download&id=1ih-kXa-5Jui4U-VETWbFqzfYUROB_Ukr"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
curl -sSfLo op.zip "https://bucket.agilebits.com/cli-private-beta/v2/op_linux_amd64_v2-alpha2.zip"
elif [[ "$OSTYPE" == "darwin"* ]]; then
curl -sSfLo op.zip "https://bucket.agilebits.com/cli-private-beta/v2/op_darwin_amd64_v2-alpha2.zip"
fi
unzip -od /usr/local/bin/ op.zip && rm op.zip
if [ -z "$OP_CONNECT_TOKEN" ] || [ -z "$OP_CONNECT_HOST" ]; then