Skip to content

che-incubator/github-secrets-generator

 
 

Repository files navigation

Github Secrets generator

Sets check if a secret is defined in a given github repo, or upload 1 or more secrets to a github repo.

Usage

  1. build the image
$ podman build -t github-secrets-generator .

Or, use ./run.sh

  1. check if a secret already exists in a repo:
$ podman run --rm --entrypoint /checkIfSecretExists.sh github-secrets-generator "${GITHUB_TOKEN}" github-org/github-repo MY_SECRET

Or, use ./run.sh

  1. load 1 or more secrets from a file, assuming each line of the file is in the format:
SECRET_VARIABLE1 SECRET_PLAINTEXT_VALUE1
SECRET_VARIABLE2 SECRET_PLAINTEXT_VALUE2
...

Use ./run.sh

  1. You can also uplod individual secrets, passing these parameters in order:
  • GITHUB_TOKEN
  • github-org/github-repo
  • SECRET_VARIABLE
  • SECRET_PLAINTEXT_VALUE
$ podman run --rm -it github-secrets-generator ${GITHUB_TOKEN} github-org/github-repo SECRET_TOKEN ${SECRET_PLAINTEXT_VALUE}

Or, to save a pair of secrets:

  • GITHUB_TOKEN
  • github-org/github-repo
  • USERNAME_VARIABLE
  • USERNAME_PLAINTEXT_VALUE
  • PASSWORD_VARIABLE
  • PASSWORD_PLAINTEXT_VALUE
$ podman run --rm -it github-secrets-generator ${GITHUB_TOKEN} github-org/github-repo QUAY_USERNAME ${QUAY_USERNAME} QUAY_PASSWORD ${QUAY_PASSWORD}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 84.1%
  • Python 9.9%
  • Dockerfile 6.0%