diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d33be29..b54b540 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -20,6 +20,8 @@ jobs: - name: Load secrets id: load_secrets uses: ./ # 1password/load-secrets-action@ + with: + export-env: true env: SECRET: op://acceptance-tests/test-secret/password SECRET_IN_SECTION: op://acceptance-tests/test-secret/test-section/password diff --git a/configure/action.yml b/configure/action.yml index 3ffe2b6..9b6bf96 100644 --- a/configure/action.yml +++ b/configure/action.yml @@ -6,6 +6,8 @@ inputs: description: Your 1Password Connect instance URL connect-token: description: Token to authenticate to your 1Password Connect instance + service-account-token: + description: Your 1Password service account token runs: using: composite steps: @@ -13,5 +15,6 @@ runs: env: INPUT_CONNECT_HOST: ${{ inputs.connect-host }} INPUT_CONNECT_TOKEN: ${{ inputs.connect-token }} + INPUT_SERVICE_ACCOUNT_TOKEN: ${{ inputs.service-account-token }} run: | ${{ github.action_path }}/entrypoint.sh diff --git a/configure/entrypoint.sh b/configure/entrypoint.sh index a0a4494..571791c 100755 --- a/configure/entrypoint.sh +++ b/configure/entrypoint.sh @@ -14,3 +14,8 @@ OP_CONNECT_TOKEN="${INPUT_CONNECT_TOKEN:-$OP_CONNECT_TOKEN}" if [ -n "$OP_CONNECT_TOKEN" ]; then echo "OP_CONNECT_TOKEN=$OP_CONNECT_TOKEN" >> $GITHUB_ENV fi + +OP_SERVICE_ACCOUNT_TOKEN="${INPUT_SERVICE_ACCOUNT_TOKEN:-$OP_SERVICE_ACCOUNT_TOKEN}" +if [ -n "$OP_SERVICE_ACCOUNT_TOKEN" ]; then + echo "OP_SERVICE_ACCOUNT_TOKEN=$OP_SERVICE_ACCOUNT_TOKEN" >> $GITHUB_ENV +fi