Skip to content

Commit

Permalink
test 4
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre committed Nov 7, 2024
1 parent e954607 commit 0f0759b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 25 deletions.
2 changes: 1 addition & 1 deletion .github/actions/extract-1password-secret/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ runs:
echo "variable_name = $variable_name"
export "$variable_name"=$value
echo "$variable_name=$value" >> $GITHUB_ENV
echo "$variable_name=\"$value\""
echo "$variable_name=$value"
done
- name: Load secrets from 1Password
Expand Down
49 changes: 25 additions & 24 deletions .github/workflows/secret_refs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,33 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# - 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/[email protected]
- name: Extract value
id: extract_value
uses: ./.github/actions/extract-1password-secret
with:
export-env: true # Export loaded secrets as environment variables
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.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"
MAVEN_GPG_PASSPHRASE: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/dkkfywvsr3xq6eyeubq6cldaxi/password"

keys: 'MAVEN_GPG_PASSPHRASE MAVEN_GPG_PRIVATE_KEY GITHUB_GENERIC_ACTION_CREDENTIALS qaz'
ONE_PASSWORD_SECRET_REFERENCES: ${{ vars.ONE_PASSWORD_SECRET_REFERENCES }}

- name: print secrets
shell: bash
- name: Use extracted value
run: |
echo "The value for the MAVEN_GPG_PASSPHRASE is $MAVEN_GPG_PASSPHRASE"
echo "The value for the GITHUB_GENERIC_ACTION_CREDENTIALS is $GITHUB_GENERIC_ACTION_CREDENTIALS"
echo "The value for the GITHUB_GENERIC_ACTION_CREDENTIALS is $GITHUB_GENERIC_ACTION_CREDENTIALS"
echo "The value for the qaz is ${{ env.qaz }}"
# - name: Load secrets from 1Password
# id: onepw_secrets
# uses: 1password/[email protected]
# with:
# export-env: true # Export loaded secrets as environment variables
# env:
# OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.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"
# MAVEN_GPG_PASSPHRASE: "op://rbiv7rvkkrsdlpcrz3bmv7nmcu/dkkfywvsr3xq6eyeubq6cldaxi/password"
#
#
# - name: print secrets
# shell: bash
# run: |
# echo "The value for the MAVEN_GPG_PASSPHRASE is $MAVEN_GPG_PASSPHRASE"
# echo "The value for the GITHUB_GENERIC_ACTION_CREDENTIALS is $GITHUB_GENERIC_ACTION_CREDENTIALS"

0 comments on commit 0f0759b

Please sign in to comment.