diff --git a/.github/workflows/secret_refs.yml b/.github/workflows/secret_refs.yml index 5427c524e4..5bd9719ea9 100644 --- a/.github/workflows/secret_refs.yml +++ b/.github/workflows/secret_refs.yml @@ -11,15 +11,30 @@ jobs: - name: Checkout repository uses: actions/checkout@v2 - - name: Extract value - id: extract_value - uses: ./.github/actions/extract-1password-secret +# - name: Extract value +# id: extract_value +# uses: ./.github/actions/extract-1password-secret +# with: +# OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} # This is required to connect to the vault in our 1Password account. +# keys: 'MAVEN_GPG_PASSPHRASE MAVEN_GPG_PRIVATE_KEY GITHUB_GENERIC_ACTION_CREDENTIALS qaz' +# ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }} +# +# - name: Use extracted value +# run: | +# echo "The value for the MAVEN_GPG_PASSPHRASE is ${{ env.MAVEN_GPG_PASSPHRASE }}" +# echo "The value for the qaz is ${{ env.qaz }}" + + - name: Load secrets from 1Password + id: onepw_secrets + uses: 1password/load-secrets-action@v2.0.0 with: - OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }} # This is required to connect to the vault in our 1Password account. - keys: 'MAVEN_GPG_PASSPHRASE MAVEN_GPG_PRIVATE_KEY GITHUB_GENERIC_ACTION_CREDENTIALS qaz' - ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }} + export-env: true # Export loaded secrets as environment variables + env: + OP_SERVICE_ACCOUNT_TOKEN: ${{ inputs.OP_SERVICE_ACCOUNT_TOKEN }} # This is required to connect to the vault in our 1Password account. + GITHUB_GENERIC_ACTION_CREDENTIALS: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/GitHub generic action token for all repos/credential" + - - name: Use extracted value + - name: print secrets + shell: bash run: | - echo "The value for the MAVEN_GPG_PASSPHRASE is ${{ env.MAVEN_GPG_PASSPHRASE }}" - echo "The value for the qaz is ${{ env.qaz }}" \ No newline at end of file + echo "The value for the GITHUB_GENERIC_ACTION_CREDENTIALS is $GITHUB_GENERIC_ACTION_CREDENTIALS" \ No newline at end of file