https://github.com/denisyfrolov/set-githubsecrets
This is a simple script to exports environment variable from the .env file to the GitHub Encrypted secrets.
https://github.com/denisyfrolov/set-githubsecrets
dotenv github secrets
Last synced: 4 months ago
JSON representation
This is a simple script to exports environment variable from the .env file to the GitHub Encrypted secrets.
- Host: GitHub
- URL: https://github.com/denisyfrolov/set-githubsecrets
- Owner: denisyfrolov
- License: other
- Created: 2021-03-16T09:33:10.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-04-05T23:47:23.000Z (about 5 years ago)
- Last Synced: 2024-04-06T22:24:14.303Z (about 2 years ago)
- Topics: dotenv, github, secrets
- Language: PowerShell
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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.
```powershell
Set-GitHubSecrets
Remove-GitHubSecrets
```
```powershell
# 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
```powershell
#This is a comment
#Assign a variable
DEPLOYKEY=KEY1
#github-secrets-skip Next var will be ignored
LOCALVAR=NOTFORGITHUB
```
Installation
============
### From PowerShell Gallery
```powershell
Install-Module -Name Set-GitHubSecrets
```