Adding variable or secret in GitHub using CLI tool

You can use gh secret or gh variable to create new entries:

gh secret set secret-name
gh variable set var-name
You will be prompted for the secret or variable values, or you can read the value from a file, pipe it to the command, or specify it as the body (-b or --body):
gh secret set secret-name < secret.txt
gh variable set var-name --body config-value