-
-
Save ybiquitous/a0617d4a0c248cec05d81fd6c2634696 to your computer and use it in GitHub Desktop.
Set GitHub secrets to multiple repositories vis GitHub CLI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
YOUR_SECRET=<value> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -eux -o pipefail | |
# See https://cli.github.com/manual/gh_secret | |
# Insert your repositories | |
repos=( | |
... | |
) | |
for repo in ${repos}; do | |
gh secret -R "${repo}" set -f .env | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment