Create GitHub Actions secrets needed for any of your repository to be build and deployed
Report Bug
·
Request Feature
Table of Contents
The reason this repository exist is a had to repeatedly create typical secrets with the same keys again and again, and decided to automate it with Node.
- Ensure
git
andnode
are installed; - You need to have an own GitHub PAT with
write
access for GitHub Actions secrets.
Is recommended:
- To have specific SSH key for GitHub Actions.
- First, you need to clone this repo using Git:
git clone https://github.com/Kenya-West/xui-api-server.git
- Install NPM packages:
npm ci
- Duplicate directory
./projects/some-proj/
at the same level with desired project name and write down the following values in.env
files:.env.github-actions-setup
: data required for script to run;.env.github-actions-secrets
: list of secrets to be set in GitHub Actions secrets for the project;.env
contents. They may (or may not) be used to create.env
file in destination machine, decoded frombase64
.
- After setuping project and filling needed values, you can launch the script with the following command:
The output would be like so:
node ./index.js --project=YOUR_PROJECT_NAME
node ./index.js --project=sd-article-summarizer-bot Project path: sd-article-summarizer-bot Successfully set secret: VPS_USERNAME Successfully set secret: VPS_IP Successfully set secret: SSH_PRIVATEKEY Successfully set secret: PROJECT_DOCKERCONTAINERNAME Successfully set secret: PROJECT_DIRNAME Successfully set secret: DOCKERHUB_USERNAME Successfully set secret: DOCKERHUB_TOKEN Successfully set secret: DOCKERHUB_REPONAME Successfully set secret: ENV_CONTENT
- Ensure
git
andnode
are installed; - You need to have an own GitHub PAT with
write
access for GitHub Actions secrets.
Is recommended:
- To have specific SSH key for GitHub Actions.
Below is an example of how you can instruct your audience on installing and setting up your app. This template doesn't rely on any external dependencies or services.
First, you need to clone this repo using Git:
- git:
git clone https://github.com/Kenya-West/xui-api-server.git
- Install NPM packages:
npm ci
- Enjoy exploring things!
- Rest this weekend well
See the open issues for a full list of proposed features (and known issues).
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Distributed under the MIT License. See LICENSE.txt
for more information.
Your Name - @Kenya-West - Kenya-West@example.com
Project Link: https://github.com/Kenya-West/gh-actions-env-create
Use this space to list resources you find helpful and would like to give credit to. I've included a few of my favorites to kick things off!