You should use the key vault action created by Azure instead: https://github.com/marketplace/actions/azure-key-vault-get-secrets
This action is designed to use the Azure CLI to add Azure Key Vault's secrets to the environment variables. Make sure you have logged in to the azure cli (using the azure/login
action) before using this action. Works similar to the AzureKeyVault
task in Azure DevOps. The environment variable name will be uppercase and dashes will be replaces with underline, so if the name is Secret-Name
, the environment variable will be calles SECRET_NAME
.
name: Get Key Vault's secrets
on:
push:
branches:
- master
- release/*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v1
- name: Login to Azure
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Download secrets
uses: gincher/azure-keyvault@v1
with:
keyVaultName: 'secrets'
secretsFilter: '*'
Key | Value | Required |
---|---|---|
keyVaultName |
The name of the Azure Key Vault from which the secrets will be downloaded. | Yes |
secretsFilter |
A comma-separated list of secret names to be downloaded. Use the default value * to download all the secrets from the vault. |
No |
This project uses the MIT license.