A simple tool to fetch a GitHub repository environments locally.
- Ngrok token in environment variable
NGROK_AUTHTOKEN
: Obtain a free token. If already have the CLI installed get it by running$ngrok config check
. - Github API PAT token
With virtualenv:
python3 -m venv myenv
source myenv/bin/activate
pip install -r requirements.txt
Fetch the value of ${{ secrets.TOKEN }}
and ${{ secrets.NAME }}
from the staging
environment of the repository in path /my/repo/dir
.
$ gh-local-fetcher fetch --env staging --val secrets.TOKEN --val secrets.NAME -p /my/repo/dir
{
"secrets.TOKEN": "some-token",
"vars.NAME": "my-secret-name"
}