Skip to content

Generates and caches Azure Key Vaults Secrets in an .env file

Notifications You must be signed in to change notification settings

Andrews-McMeel-Universal/get-envs

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Get Environment Variables Action

This GitHub action retrieves secrets from Azure Key Vaults and makes them available in your workflows.

Features

  • Generates a .env file within a job, adding all the secrets to the $GITHUB_ENV environment variable
  • Masks values with keys such as SECRET, TOKEN, KEY, PASS in the GitHub output for security.

Quick Start

Clone the repository:

git clone https://github.com/Andrews-McMeel-Universal/get-envs

Integration

To integrate get-envs into your workflow, add a step to a workflow in your .github/workflows/ directory.

Auto-detect KeyVault

Set the environment to automatically find the Azure Key Vault with matching tags to the environment and repositoryName.

- uses: Andrews-McMeel-Universal/get-envs@v1.1
  with:
    azurecredentials: ${{ secrets.AZURE_CREDENTIALS }}
    environment: development

Specify Key Vault Name

To download secrets from a specific Key Vault, specify its name in the environmentKeyVault option.

- uses: Andrews-McMeel-Universal/get-envs@v1.1
  with:
    azurecredentials: ${{ secrets.AZURE_CREDENTIALS }}
    environmentKeyVault: get-envs

Configuration Options

Variable Description Required Default
azurecredentials Azure login credentials. Usually set to ${{ secrets.AZURE_CREDENTIALS }}. ✔️ N/A
environmentKeyVault Name of the Azure Key Vault. If provided, the action will search for a matching Key Vault. N/A
repositoryName GitHub Repository Name. ${{ github.event.repository.name }}
environment Deployment environment. N/A

About

Generates and caches Azure Key Vaults Secrets in an .env file

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •