Skip to content

Commit

Permalink
test 9
Browse files Browse the repository at this point in the history
  • Loading branch information
jcpitre committed Nov 7, 2024
1 parent 783afab commit 3daf232
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/actions/extract-1password-secret/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,10 @@ runs:
env:
key_values: ${{ inputs.ONE_PASSWORD_SECRET_REFERENCES }}
run: |
keys="${{ inputs.keys }}"
keys=$(echo "${{ inputs.keys }}" | tr ',' ' ')
for key in $keys; do
variable_name=$key
value=$(echo "$key_values" | grep "^$key *=" | cut -d'=' -f2- | sed 's/^ *//;s/[ \r]*$//')
echo "key = $key"
variable_name=$(echo "$key" | sed 's/^ *//;s/ *$//')
value=$(echo "$key_values" | grep "^$variable_name *=" | cut -d'=' -f2- | sed 's/^ *//;s/[ \r]*$//')
echo "value = $value"
echo "variable_name = $variable_name"
echo "$variable_name=$value" >> $GITHUB_ENV
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/secret_refs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
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'
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
Expand Down

0 comments on commit 3daf232

Please sign in to comment.