1.1.4 • Published 2 years ago

github-secret-dotenv v1.1.4

Weekly downloads
151
License
MIT
Repository
github
Last release
2 years ago

Github Secret DotEnv (github-secret-dotenv)

type definitions code style npm GitHub Workflow Status

Upload secrets to github from your .env file

terminal screenshot

Usage

cli

npx github-secret-dotenv \

  --repository platane/github-secret-dotenv \
  # The github repository (<owner>/<repo>)
  # If omitted, read it from the package.json

  --dotEnvFilename ./.env \
  # The .env file to read
  # Default to .env

  --githubAccessToken xxxx
  # Your github access token
  # If omitted, read it from GITHUB_ACCESS_TOKEN env var
  # Generate one from https://github.com/settings/tokens/new
  # Must have permissions [public_repo  read:public_key]

  --delete
  # When set, remove all secrets that are not in the .env

node api

import { readAndUpload, createSecretUpdater } from "github-secret-dotenv";

// upload the content of .env as secrets for the github repository
await readAndUpload({
  owner: "platane",
  repo: "github-secret-dotenv",
  githubAccessToken: "xxxx",
  dotEnvFilename: ".env",
});

// upload arbitrary secret to the github repository
const updateSecret = createSecretUpdater({
  owner: "platane",
  repo: "github-secret-dotenv",
  githubAccessToken: "xxxx",
});
updateSecret("MY_SECRET", "XXXX");

License

MIT

1.1.4

2 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.1

3 years ago

1.0.0

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.0

4 years ago

0.0.3

4 years ago

0.0.5

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago