Skip to content

This is a simple script to exports environment variable from the .env file to the GitHub Encrypted secrets.

License

Notifications You must be signed in to change notification settings

denisyfrolov/Set-GitHubSecrets

Repository files navigation

Set-GitHubSecrets

PowerShell DotEnv to GitHub Encrypted secrets

This is a simple script to exports environment variable from the .env file to the GitHub Encrypted secrets.

Usage

Add the function Set-GitHubSecrets to the prompt function.

Set-GitHubSecrets
Remove-GitHubSecrets
# This is function is called by convention in PowerShell
function prompt {
    Set-GitHubSecrets
    Remove-GitHubSecrets
}

Create a .env file at the folder level the environment variable has to be exported
Sample .env file

#This is a comment
#Assign a variable
DEPLOYKEY=KEY1
#github-secrets-skip Next var will be ignored
LOCALVAR=NOTFORGITHUB

Installation

From PowerShell Gallery

Install-Module -Name Set-GitHubSecrets

About

This is a simple script to exports environment variable from the .env file to the GitHub Encrypted secrets.

Topics

Resources

License

Stars

Watchers

Forks