https://github.com/imomaliev/library-template
Template for creating library repository
https://github.com/imomaliev/library-template
editorconfig pre-commit template terraform
Last synced: about 1 year ago
JSON representation
Template for creating library repository
- Host: GitHub
- URL: https://github.com/imomaliev/library-template
- Owner: imomaliev
- License: mit
- Created: 2022-03-02T16:37:32.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-16T16:00:51.000Z (almost 4 years ago)
- Last Synced: 2025-02-14T00:23:06.557Z (over 1 year ago)
- Topics: editorconfig, pre-commit, template, terraform
- Language: HCL
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# library-template
Template for creating library repository
## Usage
Clone project with [`degit`](https://github.com/Rich-Harris/degit)
```console
$ degit imomaliev/library-template/template library_name
$ cd library_name
```
### Configure terraform
1. Update `_terraform/main.tf`. Available options are [here](https://github.com/imomaliev/terraform-registry/tree/main/modules/github)
Example:
```terraform
module "github" {
# https://github.com/imomaliev/terraform-registry/tree/main/modules/github
source = "git@github.com:imomaliev/terraform-registry.git//modules/github"
token = var.github_token
project_name = "Library Name"
project_description = "Discription of Library Name"
topics = ["template", "terraform", "pre-commit", "editorconfig"]
}
```
1. Copy `tfvars` file from template
```console
$ cp _terraform/terraform.tfvars{.template,}
```
1. Add your github token to `_terraform/terraform.tfvars`
1. Run terraform
```console
$ cd _terraform
$ terraform init -upgrade
$ terrafom plan -out
$ terraform apply
```
1. Initialize git repo from created repo by terraform
```console
$ git init
$ git clone git@github.com:user/library_name.git
$ git fetch
$ git checkout -B main origin/main
```
1. Commit template files
```console
$ pre-commit install
$ git add .
$ git commit -m 'degit imomaliev/library-template/template'
```