Skip to content

Latest commit

 

History

History
258 lines (190 loc) · 9.53 KB

README.md

File metadata and controls

258 lines (190 loc) · 9.53 KB

Contributors Forks Stargazers Issues MIT License LinkedIn


Logo

GitHub Actions environment create

Create GitHub Actions secrets needed for any of your repository to be build and deployed

Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

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.

(back to top)

Built With

Node

(back to top)

Getting Started: usage

Prerequisites

  • Ensure git and node 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.

Installation

  1. First, you need to clone this repo using Git:
    git clone https://github.com/Kenya-West/xui-api-server.git
  2. Install NPM packages:
    npm ci
  3. 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 from base64.
  4. After setuping project and filling needed values, you can launch the script with the following command:
    node ./index.js --project=YOUR_PROJECT_NAME
    The output would be like so:
    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

(back to top)

Getting Started: contributing & development

Prerequisites

  • Ensure git and node 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.

Installation

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:

  1. git:
    git clone https://github.com/Kenya-West/xui-api-server.git
  2. Install NPM packages:
    npm ci
  3. Enjoy exploring things!

(back to top)

Roadmap

  • Rest this weekend well

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Top contributors:

contrib.rocks image

(back to top)

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)

Contact

Your Name - @Kenya-West - Kenya-West@example.com

Project Link: https://github.com/Kenya-West/gh-actions-env-create

(back to top)

Acknowledgments

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!

(back to top)