-
Notifications
You must be signed in to change notification settings - Fork 101
42 lines (37 loc) · 1.73 KB
/
secret_refs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: secret-refs
on:
push:
branches: [ 1906-publishing-maven-package-github-action-is-failing ]
workflow_dispatch:
jobs:
my-job2:
runs-on: ubuntu-latest
steps:
- 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/load-secrets-action@v2.0.0
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"