Browse Source

Update deprecated Azure Key Vault in workflows (#68)

* Update deprecated Azure Key Vault in workflows

* Fix tests
pull/70/head
Michał Chęciński 3 years ago committed by GitHub
parent
commit
4d2beb22bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      lint-workflow/tests/test.yml
  2. 2
      lint-workflow/tests/test_lint.py
  3. 17
      setup-docker-trust/action.yml

15
lint-workflow/tests/test.yml

@ -24,10 +24,17 @@ jobs:
- name: Retrieve secrets - name: Retrieve secrets
id: retrieve-secrets id: retrieve-secrets
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403 env:
with: KEYVAULT: bitwarden-prod-kv
keyvault: "bitwarden-prod-kv" SECRETS: |
secrets: "crowdin-api-token" crowdin-api-token
run: |
for i in ${SECRETS//,/ }
do
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv)
echo "::add-mask::$VALUE"
echo "::set-output name=$i::$VALUE"
done
- name: Download translations - name: Download translations
uses: crowdin/github-action@e39093fd75daae7859c68eded4b43d42ec78d8ea # v1.3.2 uses: crowdin/github-action@e39093fd75daae7859c68eded4b43d42ec78d8ea # v1.3.2

2
lint-workflow/tests/test_lint.py

@ -10,7 +10,7 @@ def test_lint(capfd):
in out in out
) )
assert ( assert (
"\x1b[33mwarning\x1b[0m Step 3 of job key 'crowdin-pull' uses an outdated action, consider updating it" "\x1b[33mwarning\x1b[0m Step 4 of job key 'crowdin-pull' uses an outdated action, consider updating it"
in out in out
) )
assert ( assert (

17
setup-docker-trust/action.yml

@ -27,13 +27,20 @@ runs:
- name: Retrieve secrets - name: Retrieve secrets
id: get-secrets id: get-secrets
uses: Azure/get-keyvault-secrets@80ccd3fafe5662407cc2e55f202ee34bfff8c403 env:
with: KEYVAULT: ${{ inputs.azure-keyvault-name }}
keyvault: ${{ inputs.azure-keyvault-name }} SECRETS: |
secrets: "docker-password, docker-password,
docker-username, docker-username,
dct-delegate-repo-passphrase, dct-delegate-repo-passphrase,
dct-delegate-key" dct-delegate-key
run: |
for i in ${SECRETS//,/ }
do
VALUE=$(az keyvault secret show --vault-name $KEYVAULT --name $i --query value --output tsv)
echo "::add-mask::$VALUE"
echo "::set-output name=$i::$VALUE"
done
- name: Log into Docker - name: Log into Docker
shell: bash shell: bash

Loading…
Cancel
Save